Skip to main content

Add search to Textual SelectionList.

Project description

Searchable SelectionList

image Project License - MIT

Add search to Textual's SelectionList.

  • Selectable items can be filtered by substring.
  • Select one or multiple items.
  • Search is case-insensitive.
  • Title and description can be customized.

Installation

pip install textual-searchable-selectionlist

Usage

from textual_searchable_selectionlist.options import SelectionStrategy
from textual_searchable_selectionlist.select import select, select_enum

selected = select(
    ['John', 'Jane', 'James'],
    selection_strategy=SelectionStrategy.MULTIPLE,
    search_title='Select people',
)

# Enums
# class Color(Enum):
#     RED = 'red'
#     GREEN = 'green'
#
# selected_colors = select_enum(Color, selection_strategy=SelectionStrategy.ONE)

Testing

There are currently no automated tests. Manual testing can be done by running:

python tests/manual/searchable_selection_list_select.py

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

textual_searchable_selectionlist-0.0.4.tar.gz (21.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

textual_searchable_selectionlist-0.0.4-py2.py3-none-any.whl (9.5 kB view details)

Uploaded Python 2Python 3

File details

Details for the file textual_searchable_selectionlist-0.0.4.tar.gz.

File metadata

File hashes

Hashes for textual_searchable_selectionlist-0.0.4.tar.gz
Algorithm Hash digest
SHA256 fe95825e57511852028dadec9fada857d9c59d61f2dfd7bfa4a4f2fdfe5bc289
MD5 14b5907a034b0de9269fff310b475184
BLAKE2b-256 96b436ea97d4b6ec3e820adde74723000257bc1e44cce1e30e16ce3bf98e4b65

See more details on using hashes here.

File details

Details for the file textual_searchable_selectionlist-0.0.4-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for textual_searchable_selectionlist-0.0.4-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 c1689c2f01cf325f2ff7d0886f3d1e0a89ae6ac8ea1a6d86777538b9ea45a3bf
MD5 59e26a7267483cc316238dcd2dd5825b
BLAKE2b-256 5370266d21240ba026ca4a08479b9418134f671975f10852e6b8d357363e23c7

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page