Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐛 AutoSuggestBox => noResultsFoundBuilder issue with selection #1143

Open
DevMensIT opened this issue Nov 21, 2024 · 0 comments
Open

🐛 AutoSuggestBox => noResultsFoundBuilder issue with selection #1143

DevMensIT opened this issue Nov 21, 2024 · 0 comments

Comments

@DevMensIT
Copy link

DevMensIT commented Nov 21, 2024

Describe the bug

Bug when i tried to select using arrow key its not going to getting selected while noResultsFoundBuilder
also i tried 'selected: true' and pressed entered key but focus getting lost.

AutoSuggestBox<String>(
              autofocus: true,
              controller: tempController,
              noResultsFoundBuilder: (context) {
                return ListTile.selectable(
                  title: Text('Add \'${tempController.text.toString()}\''),
                  onPressed: () {
                    setState(() {
                      cats.add(tempController.text.toString());
                    });
                    tempController.clear();
                  },
                );
              },
              placeholder: 'Type a cat name',
              items: cats.map((cat) {
                return AutoSuggestBoxItem<String>(
                    value: cat,
                    label: cat,
                    onFocusChange: (focused) {
                      if (focused) {
                        debugPrint('Focused $cat');
                      }
                    });
              }).toList(),
              onSelected: (item) {
                setState(() => selectedCat = item.toString());
              },
            )

Expected behavior
when 'noResultsFoundBuilder' call i want to select ListTile.selectable and i want use enter key to call that function

Screenshots

fluent_up_demo.2024-11-21.13-08-57.mp4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant