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

searching in the list not working #13

Open
mnarsely opened this issue Oct 16, 2021 · 2 comments
Open

searching in the list not working #13

mnarsely opened this issue Oct 16, 2021 · 2 comments

Comments

@mnarsely
Copy link

Hello I am having an issue regarding searching in "SelectFormFieldType.dialog", I don't know if I have missed something but it seems like the search doesn't seem to work.

Here is my code:

List of items:

List<Map<String, dynamic>> _items = [ { 'value': '', 'label': 'Select Account', 'icon': Icon(Icons.account_balance) }, {'value': '', 'label': 'Account 1', 'icon': Icon(Icons.account_balance)}, {'value': '', 'label': 'Account 2', 'icon': Icon(Icons.account_balance)}, {'value': '', 'label': 'Account 3', 'icon': Icon(Icons.account_balance)} ];

Here is selectformfield:
SelectFormField( dialogCancelBtn: 'Cancel', enableSearch: true, dialogSearchHint: 'Search account', type: SelectFormFieldType.dialog, // or can be dialog icon: Icon(Icons.account_balance), labelText: 'Select Account', hintText: 'Select Account', items: _items, onChanged: (val) { print(val); }, )

Here is the screenshot of the list and output when searching item
Screenshot_1634376900
Screenshot_1634376922

@hslbetto
Copy link
Member

I tested with your items collection and you params, it work fine for me. I'll need more detail ...

@chandero
Copy link

chandero commented Sep 9, 2022

the error is here:
String lsQuery = _oCtrlSearchQuery.text;
must be
String lsQuery = _oCtrlSearchQuery.text.toLowerCase();

if you type in lower case it works.

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

3 participants