panel
panel copied to clipboard
Add a Search widget
Panel has the AutocompleteInput
widget that helps application users to select an item among a large list of options available. However it only works from left-to-right. A full-blown Search widget would be a very nice addition to Panel.
Some times ago I implemented this widget:
It needs some polish but it can be a base The code can be found in this repository https://github.com/xavArtley/BokehParallelCoordinates.git https://github.com/xavArtley/BokehParallelCoordinates/blob/7a743e5d92e72072fa647bbb225dd122a1bf280f/pcp/models/multiselect.py https://github.com/xavArtley/BokehParallelCoordinates/blob/7a743e5d92e72072fa647bbb225dd122a1bf280f/pcp/models/multiselect.ts
Thanks @xavArtley for sharing the code of this widget which seems very powerful. Sort of a mix of a Search widget/Select/Multichoice. Btw I also recently opened an issue for a Select widget with a select-all feature, a la Excel or Tableau (https://github.com/holoviz/panel/issues/3018).
This widget would be very useful!! Some kind of a mix between MultiChoice and Select widgets. All the above suggestions sound great:
- Option to Select All or Dis-select all
- Search bar that filters the shown dropdown - this can be either in a dedicated search bar or in the widget itself.
- Maybe also an option to "select all" that selects just the filtered results (after filtering by the search bar).
I want able to implement to example above within panel for some reason.
If I can chip in: the AutocompleteInput
is a type of "select one among many" widget, while the examples given by @xavArtley and @alon-sht concern a "select many among many with the option to [de]select all".
Certainly what is needed is both, but those are two separate issues @maximlt . I wouldn't link #3383 with this issue.
I would focus this issue on changing the search method of AutocompleteInput
to search within the whole string rather than just the beginning. What do you think?
Thanks for chiming in @hyamanieu, what you say totally makes sense to me.
I would focus this issue on changing the search method of
AutocompleteInput
to search within the whole string rather than just the beginning. What do you think?
I am not sure it's a good idea. The semantics of auto-completing is different from searching. Also if the search functionality is embedded in the auto-complete widget it makes it harder for users to find it. I'd be more in favor of dedicated Search widget.
Fixed by https://github.com/holoviz/panel/pull/5832