8000 Tabulator: allow to set a maximum number of selectable rows by maximlt · Pull Request #2791 · holoviz/panel · GitHub
[go: up one dir, main page]

Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
update docs
  • Loading branch information
maximlt committed Sep 28, 2021
commit 6f58d75655eb2b84380f94eef476806fdcbfe3b6
49 changes: 25 additions & 24 deletions examples/reference/widgets/Tabulator.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -35,19 +35,32 @@
"* **``groupby``** (`list`): Groups rows in the table by one or more columns.\n",
"* **``hierarchical``** (boolean, default=False): Whether to render multi-indexes as hierarchical index (note hierarchical must be enabled during instantiation and cannot be modified later)\n",
"* **``hidden_columns``** (`list`): List of columns to hide.\n",
"* **``layout``** (str): Describes the column layout mode with one of the following options `'fit_columns'`, `'fit_data'`, `'fit_data_stretch'`, `'fit_data_fill'`, `'fit_data_table'`. \n",
"* **``layout``** (``str``, `default='fit_data_table'`): Describes the column layout mode with one of the following options `'fit_columns'`, `'fit_data'`, `'fit_data_stretch'`, `'fit_data_fill'`, `'fit_data_table'`. \n",
"* **``frozen_columns``** (`list`): List of columns to freeze, preventing them from scrolling out of frame. Column can be specified by name or index.\n",
"* **``frozen_rows``**: (`list`): List of rows to freeze, preventing them from scrolling out of frame. Rows can be specified by positive or negative index.\n",
"* **``page``** (``int``): Current page if pagination is enabled.\n",
"* **``page_size``** (``int``): Number of rows on each page.\n",
"* **``pagination``** (`str`, `default=None`): Set to 'local' or 'remote' to enable pagination; by default pagination is disabled with the value set to `None`.\n",
"* **``page``** (``int``, `default=1`): Current page if pagination is enabled.\n",
"* **``page_size``** (``int``, `default=20`): Number of rows on each page.\n",
"* **``pagination``** (`str`, `default=None`): Set to `'local` or `'remote'` to enable pagination; by default pagination is disabled with the value set to `None`.\n",
"* **``row_height``** (``int``, `default=30`): The height of each table row.\n",
"* **``selection``** (``list``): The currently selected rows.\n",
"* **``selectable``** (`boolean` or `str`): Whether to allow selection of rows. Can be `True`, `False`, `'checkbox'`, `'checkbox-single'` or `'toggle'`. \n",
"* **``selectable``** (`boolean` or `str` or `int`, `default=True`): Defines the selection mode:\n",
" * `True`\n",
" Selects rows on click. To select multiple use Ctrl-select, to select a range use Shift-select\n",
" * `False`\n",
" Disables selection\n",
" * `'checkbox'`\n",
" Adds a column of checkboxes to toggle selections\n",
" * `'checkbox-single'`\n",
" Same as 'checkbox' but header does not alllow select/deselect all\n",
" * `'toggle'`\n",
" Selection toggles when clicked\n",
" * `int`\n",
" The maximum number of selectable rows.\n",
"* **``selectable_rows``** (`callable`): A function that should return a list of integer indexes given a DataFrame indicating which rows may be selected.\n",
"* **``show_index``** (``boolean``): Whether to show the index column.\n",
"* **``text_align``** (``dict`` or ``str``): A mapping from column name to alignment or a fixed column alignment, which should be one of 'left', 'center', 'right'.\n",
"* **`theme`** (``str``): The CSS theme to apply (note that changing the theme will restyle all tables on the page).\n",
"* **`titles`** (``dict``): A mapping from column name to a title to override the name with.\n",
"* **``show_index``** (``boolean``, `default=True`): Whether to show the index column.\n",
"* **``text_align``** (``dict`` or ``str``): A mapping from column name to alignment or a fixed column alignment, which should be one of `'left'`, `'center'`, `'right'`.\n",
"* **`theme`** (``str``, `default='simple'`): The CSS theme to apply (note that changing the theme will restyle all tables on the page), which should be one of `'default'`, `'site'`, `'simple'`, `'midnight'`, `'modern'`, `'bootstrap'`, `'bootstrap4'`, `'materialize'`, `'bulma'`, `'semantic-ui'`, or `'fast'`.\n",
"* **``titles``** (``dict``): A mapping from column name to a title to override the name with.\n",
"* **``value``** (``pd.DataFrame``): The pandas DataFrame to display and edit\n",
"* **``widths``** (``dict``): A dictionary mapping from column name to column width in the rendered table.\n",
"\n",
Expand Down Expand Up @@ -445,7 +458,8 @@
"- `False`: Disables selection\n",
"- `'checkbox'`: Adds a column of checkboxes to toggle selections\n",
"- `'checkbox-single'`: Same as `'checkbox'` but disables (de)select-all in the header\n",
"- `'toggle'`: Selection toggles when clicked"
"- `'toggle'`: Selection toggles when clicked\n",
"- Any positive `int`: A number that sets the maximum number of selectable rows"
]
},
{
Expand Down Expand Up @@ -943,22 +957,9 @@
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.7.10"
"pygments_lexer": "ipython3"
}
},
"nbformat": 4,
Expand Down
0