Skip to main content

Add search to Textual SelectionList.

Project description

Searchable SelectionList

Add search to Textual's SelectionList.

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

Installation

pip install searchable-selection-list

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.1.tar.gz (17.3 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.1-py2.py3-none-any.whl (8.0 kB view details)

Uploaded Python 2Python 3

File details

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

File metadata

File hashes

Hashes for textual_searchable_selectionlist-0.0.1.tar.gz
Algorithm Hash digest
SHA256 3bf6b85c604b669d0dcc16370cf5dd162f9f672a27efcfb240e170ce3a7c1d91
MD5 23744889b6b99af8cdb1789fe4d1f4f0
BLAKE2b-256 e9f02f0cfc7ac20faad9a46fb968b71adb92a8c2a5d1dd015d517b2e013877b4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for textual_searchable_selectionlist-0.0.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 e240491c0cf385c13c1e407e398d615b24f15d9d545b7a272a78cd18eb2eeaf1
MD5 de7820f9da7cec20ca0f3d66cfc3a7b7
BLAKE2b-256 630c3706e97884993dd6d4a395a851a55fe1ad1dfe344a52a9a650e3535cde06

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