bootstack.ask_filter#

bootstack.ask_filter(items, *, title='', enable_search=False, enable_select_all=False, parent=None)#

Show a multi-select filter dialog.

Parameters:
  • items (list[str | dict[str, Any]]) –

    Items to display. Each item is a string or a dict with keys:

    • text (str): Display label (required for dicts).

    • value (Any): Value returned when selected. Defaults to text.

    • selected (bool): Initial check state. Defaults to False.

  • title (str) – Dialog window title.

  • enable_search (bool) – Include a search box that filters items by text. Defaults to False.

  • enable_select_all (bool) – Include a “Select All” checkbox. Defaults to False.

  • parent (Any) – Parent widget. Defaults to the active root window.

Returns:

A list of selected values, or None if canceled.

Return type:

list[Any] | None