Skip to content

Instantly share code, notes, and snippets.

View MattJBritton's full-sized avatar

Matt Britton MattJBritton

View GitHub Profile
@MattJBritton
MattJBritton / 01_multi_select_widget_readme.md
Last active September 19, 2023 02:25 — forked from pbugnion/01_multi_select_widget_readme.md
Multiple checkbox selection with searching with ipywidgets

Multiple selection with checkboxes and search field

This gist is forked from pbugnion's great work on building a searchable multi-checkbox using ipywidgets. You can find that work in this gist.

This version adds compatability with Jupyter Widgets' interactive_output() function, and also makes it easier to see which elements were selected by sorting them to the top. It also makes a few small changes to enable this to work in Jupyter Lab.

Image of dropdown

Usage

@pbugnion
pbugnion / 01_multi_select_widget_readme.md
Last active July 9, 2021 11:21
Multiple checkbox selection with searching with ipywidgets

Multiple selection with checkboxes and search field

Often, you want the user to choose n options (where n is small-ish) from a very large (hundreds or thousands) number of possibilities. Good UX around this dictates that the user should be able to search for the options they want.

This gist puts together a minimal example of binding a search field with multiple checkboxes using ipywidgets.

Usage