Components Data
Data tablelive
Rows searched, sorted and paged by Python, as you type and click. A live component.
A live component: its state is kept on the server, and each click or keystroke is answered by its Python class. Put @pbscripts in your layout.
$ pyblade ui:add data-table
Search, sort and page
Props
Written as attributes of <pb-ui.data-table>; put a colon before one to pass it a Python value, as in :items="items". A slot is written <pb-slot:name>.
| Name | Type | Default | Description |
|---|---|---|---|
| columns | list | [] | A list of {"key", "label"} |
| rows | list | [] | A list of dicts, with the keys of the columns |
| per_page | int | 5 | How many rows a page holds |
| search_prompt | str | "Search ..." | Shown in its search field |