Skip to content

Commit

Permalink
Support creating records inline
Browse files Browse the repository at this point in the history
  • Loading branch information
hillelcoren committed May 4, 2022
1 parent d828f49 commit 30db8fd
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions lib/ui/app/entity_dropdown.dart
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,14 @@ class _EntityDropdownState extends State<EntityDropdown> {
if (entity?.id == _AutocompleteEntity.KEY) {
final name = (entity as _AutocompleteEntity).name;
_textController.text = name;

_focusNode.removeListener(_onFocusChanged);
_focusNode.requestFocus();
WidgetsBinding.instance.addPostFrameCallback((duration) {
_textController.selection = TextSelection.fromPosition(
TextPosition(offset: _textController.text.length));
});

final completer = Completer<SelectableEntity>();
completer.future.then((value) {
showToast(AppLocalization.of(navigatorKey.currentContext)
Expand Down

0 comments on commit 30db8fd

Please sign in to comment.