mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2024-08-30 18:12:39 +00:00
feat: close popover on text field tap
This commit is contained in:
committed by
Cyrine-benabid
parent
3e76fa8e42
commit
b7f369b3d9
@ -10,6 +10,8 @@ class InputTextField extends StatefulWidget {
|
||||
final void Function(String)? onChanged;
|
||||
final void Function() onCanceled;
|
||||
final void Function()? onFocused;
|
||||
final void Function()? onTap;
|
||||
|
||||
final bool autoClearWhenDone;
|
||||
final String text;
|
||||
final int? maxLength;
|
||||
@ -20,6 +22,7 @@ class InputTextField extends StatefulWidget {
|
||||
required this.onCanceled,
|
||||
this.onChanged,
|
||||
this.onFocused,
|
||||
this.onTap,
|
||||
this.autoClearWhenDone = false,
|
||||
this.maxLength,
|
||||
Key? key,
|
||||
@ -73,6 +76,11 @@ class _InputTextFieldState extends State<InputTextField> {
|
||||
_controller.text = "";
|
||||
}
|
||||
},
|
||||
onTap: () {
|
||||
if (widget.onTap != null) {
|
||||
widget.onTap!();
|
||||
}
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -288,6 +288,9 @@ class _CreateOptionTextField extends StatelessWidget {
|
||||
onFocused: () {
|
||||
popoverMutex?.close();
|
||||
},
|
||||
onTap: () {
|
||||
popoverMutex?.close();
|
||||
},
|
||||
);
|
||||
},
|
||||
);
|
||||
|
Reference in New Issue
Block a user