Skip to content

option to append suggestion to textField rather than replacing its content #82

@matteoandreozzi

Description

@matteoandreozzi
                                    `String newText = suggestion.toString();
                                    if (submitOnSuggestionTap) {
                                    textField.focusNode.unfocus();
                                    itemSubmitted(suggestion);
                                    if (clearOnSubmit) {
                                      clear();
                                    }
                                  } else {
                                    String newText = suggestion.toString();

                                    textChanged(newText);
                                  }
                                    textField.controller.text = 
                                        appendOnTap?  textField.controller.text +newText: newText;`                                                                               

I think it would be really useful if something like the above snippet was implemented in updateOverlay , as it would allow for implementing "suggest as you type" kind of text areas with filters like the one below, which matches last typed single words with the suggestions list:
itemFilter: (item, query) { return item .toLowerCase() .startsWith(query.toLowerCase().split(' ').last); },

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions