Shimoku docs
Search…
⌃K

Search bars

Our tables have the option to enable multiple search bars, so that you can find the entries that have that exact value on the column linked to the search bar.
To activate the search bars you have to provide the columns that the search bars will link to, the same way as with the filters:
data_ = [
{'date': dt.date(2021, 1, 1), 'x': 5, 'y': 5, 'searchA': 'A', 'searchB': 'B'},
{'date': dt.date(2021, 1, 2), 'x': 6, 'y': 5, 'searchA': 'B', 'searchB': 'Z'},
{'date': dt.date(2021, 1, 3), 'x': 4, 'y': 5, 'searchA': 'C', 'searchB': 'W'},
{'date': dt.date(2021, 1, 4), 'x': 7, 'y': 5, 'searchA': 'B', 'searchB': 'T'},
{'date': dt.date(2021, 1, 5), 'x': 3, 'y': 5, 'searchA': 'A', 'searchB': 'Z'},
]
search_columns: List[str] = ['searchA', 'searchB']
shimoku.plt.table(
data=data_,
menu_path='test/table-1',
order=0,
search_columns=search_columns,
)
The result is:
Table with enabled search bars
To use the search bar you just need to type the desired value and it automatically searches for the entries that match the value:
Result from searching the value B in the column searchA
You can rearrange alphabetically (direct or reverse order) the content of the table by clicking on a column linked to a search bar. The result is like this:
Don't activate a column as a sorting column and a search column, the searching options automatically enable sorting.
Entries sorted in ascending order using the column searchA
Using a column as a filter and a search column is not permitted, but each column of a table can have one of the two options.