esentis / multiple_search_selection

A highly customizable multiple selection widget with fuzzy search functionality.
https://pub.dev/packages/multiple_search_selection
BSD 3-Clause "New" or "Revised" License
12 stars 13 forks source link

Display list items only when list is clicked #6

Closed bubnenkoff closed 2 years ago

bubnenkoff commented 2 years ago

Now I at start we see dropdown list, but I would like to show it only when there was click on input for picking elements

esentis commented 2 years ago

Hello there and thanks for taking the time to fill the issue.

Let's see if I get it correctly, you want the list (of which you pick the items) to not be visible until you have typed something in the search field ?

bubnenkoff commented 2 years ago

By default I am seeing items for picking. List of them is open. I would like to get it works as classical dropdown menu with muliselect. So before getting all list user should click on dropdown menu.

esentis commented 2 years ago

Ok I think I understood.

Thing is, the list was not meant to work as a dropdown. I don't know how the search would work with a dropdown implementation.

I will leave this open and will look into it soon.

umangsh commented 2 years ago

A possible way this can work is:

  1. Initialize widget with initialPickedItems, display ONLY the textformfield with pickeditemchips. Search bar + items scroll container is hidden. _MultipleSearchSelectionState.expanded seems related but isn't used as far as I can tell: https://github.com/esentis/multiple_search_selection/blob/develop/lib/multiple_search_selection.dart#L465

  2. Add a dropdown toggle that can toggle display for the search + items container (See image). onTap outside the dropdown hides it.

    Screen Shot 2022-06-28 at 10 31 01 AM

Hope this is helpful!

esentis commented 2 years ago

Awesome, thanks for the tips !

umangsh commented 2 years ago

No problem. It's a great plugin, thanks for being open to feature requests!