-
Notifications
You must be signed in to change notification settings - Fork 94
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
show full list by default if no search value #40
Comments
Hey, set minimumChars to 0 (Zero); and on your search method whenever the value is empty you should return the entire list; |
@CoderAware Thanks for your reply, minimumChars set to 0 is ok when i type some search text and then delete it, but still got some problem? 1. cannot show the list when initialization since "onSearch" event will not fire when i enter the screen. 2. When click Cancel, no way to set search value to empty and trigger Search function Can we allow set search value and trigger search function via searchController? then we can call it when initState and onCancel, to make it more flexible? Or any other way can achieve my gold? |
Hey @davidchan666999 You can set the Best |
Hi |
I managed to solve this by rebuilding the whole widget when the async function that gets my initial full list finishes.
Good luck |
@pelanmar1 That works, but you won't be able to filter and sort those. |
Seconding this. Look at building, for instance, as streambuilder. In the end I hacked a way to pagination and stream listening both during and outside of search. None of this is good, as I'm new to this, but I ended up doing something like the below for a toy project. This takes a lot of less than fun tracking & global variables, but I'm sure a more adept coder could do much better.
|
thanks for the great package, is possible to show full list by default when no search value? It will be great if supported this option.
The text was updated successfully, but these errors were encountered: