panel icon indicating copy to clipboard operation
panel copied to clipboard

Add a Search widget

Open maximlt opened this issue 3 years ago • 5 comments

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.

maximlt avatar Jan 19 '22 17:01 maximlt

Some times ago I implemented this widget: ms_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

xavArtley avatar Jan 20 '22 14:01 xavArtley

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).

maximlt avatar Jan 22 '22 00:01 maximlt

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.

alon-sht avatar Apr 14 '22 15:04 alon-sht

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?

hyamanieu avatar Jul 04 '22 12:07 hyamanieu

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.

maximlt avatar Jul 18 '22 12:07 maximlt

Fixed by https://github.com/holoviz/panel/pull/5832

maximlt avatar Dec 11 '23 18:12 maximlt