remove double enter trigger
This commit is contained in:
@@ -66,7 +66,6 @@ class _ClaimStatementWindowState extends State<ClaimStatementWindow> {
|
||||
final ValueNotifier<String> medAid = ValueNotifier("");
|
||||
List<ICD10Code> icd10codeList = [];
|
||||
final FocusNode _searchFocusNode = FocusNode();
|
||||
final FocusNode _focusNode = FocusNode();
|
||||
|
||||
void icd10SearchWindow(List<ICD10Code> codeList) {
|
||||
showDialog(
|
||||
@@ -189,19 +188,7 @@ class _ClaimStatementWindowState extends State<ClaimStatementWindow> {
|
||||
},
|
||||
),
|
||||
//const SizedBox(height: 10),
|
||||
KeyboardListener(
|
||||
focusNode: _focusNode,
|
||||
autofocus: true,
|
||||
onKeyEvent: (event) async {
|
||||
if (event is KeyDownEvent &&
|
||||
event.logicalKey == LogicalKeyboardKey.enter) {
|
||||
MIHIcd10CodeApis.getIcd10Codes(_icd10CodeController.text, context)
|
||||
.then((result) {
|
||||
icd10SearchWindow(result);
|
||||
});
|
||||
}
|
||||
},
|
||||
child: MihSearchBar(
|
||||
MihSearchBar(
|
||||
controller: _icd10CodeController,
|
||||
hintText: "ICD-10 Code & Description",
|
||||
prefixIcon: Icons.search,
|
||||
@@ -218,7 +205,6 @@ class _ClaimStatementWindowState extends State<ClaimStatementWindow> {
|
||||
},
|
||||
searchFocusNode: _searchFocusNode,
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 10),
|
||||
MIHTextField(
|
||||
controller: _amountController,
|
||||
|
||||
@@ -353,16 +353,7 @@ class _PrescripInputState extends State<PrescripInput> {
|
||||
children: [
|
||||
//const SizedBox(height: 25.0),
|
||||
|
||||
KeyboardListener(
|
||||
focusNode: _focusNode,
|
||||
autofocus: true,
|
||||
onKeyEvent: (event) async {
|
||||
if (event is KeyDownEvent &&
|
||||
event.logicalKey == LogicalKeyboardKey.enter) {
|
||||
getMedsPopUp(widget.medicineController);
|
||||
}
|
||||
},
|
||||
child: MihSearchBar(
|
||||
MihSearchBar(
|
||||
controller: widget.medicineController,
|
||||
hintText: "Search Medicine",
|
||||
prefixIcon: Icons.search,
|
||||
@@ -376,7 +367,6 @@ class _PrescripInputState extends State<PrescripInput> {
|
||||
},
|
||||
searchFocusNode: _searchFocusNode,
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 10.0),
|
||||
|
||||
MIHDropdownField(
|
||||
|
||||
Reference in New Issue
Block a user