lcuis / search_choices

Widget to let the user search through a keyword string typed on a customizable keyboard in a single or multiple choices list presented as a dropdown in a dialog box or a menu.
MIT License
51 stars 42 forks source link

Multi dialogue paged future search hint #88

Closed rob-mur closed 2 years ago

rob-mur commented 2 years ago

Hi

I think I've found a bug/at least something that should be better documented.

If you want to have filters/sorting in a multi dialogue paged future (and potentially the menu variant too) then it isn't enough to fill out futureSearchFn and futureSearchFilterOptions/futureSearchOrderOptions. You also need to set searchHint: "".

Otherwise the buttons to filter/sort don't show at the top of dialogue. I had ran into this because it wasn't clear that a search hint would be necessary in order to add filter buttons.

To recreate the problem, simply clone the examples project and remove the searchHint: "", in Multi dialog paged future.

lcuis commented 2 years ago

Thanks a lot @rob-mur , well spotted. I look forward to try to reproduce and fix this issue.

lcuis commented 2 years ago

I was able to reproduce the issue. The sort and filter buttons don't appear when searchHint is not provided. I intend to fix this.

lcuis commented 2 years ago

I was able to fix but this is not fully tested with flutster tests. Thus, I didn't publish to pub.dev yet. This should be in version 2.1.2 . Thanks @rob-mur !

rob-mur commented 2 years ago

No problem at all, well done for the speedy turn around!

lcuis commented 2 years ago

Hello @rob-mur ,

Version 2.1.2 has just been released to pub.dev .

Cheers!

lcuis commented 2 years ago

Closing. Feel free to reopen if needed.