mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-18 19:46:36 +00:00
docs(data-table): add example "Batch selection with controlled toolbar"
This commit is contained in:
parent
43bcbee7ba
commit
04933489ae
2 changed files with 73 additions and 0 deletions
|
@ -1115,6 +1115,16 @@ Use the `selectedRowIds` prop to specify which rows should be selected.
|
|||
|
||||
<FileSource src="/framed/DataTable/DataTableBatchSelectionToolbar" />
|
||||
|
||||
### Batch selection with controlled toolbar
|
||||
|
||||
By default, `ToolbarBatchActions` is activated if one or more rows is selected. Clicking "Cancel" will deactivate it.
|
||||
|
||||
Use the `active` prop to control the toolbar. Note that it will still activate if one or more rows are selected.
|
||||
|
||||
You can also prevent the default "Cancel" behavior in the dispatched `on:cancel` event.
|
||||
|
||||
<FileSource src="/framed/DataTable/DataTableBatchSelectionToolbarControlled" />
|
||||
|
||||
### Selectable (radio)
|
||||
|
||||
<FileSource src="/framed/DataTable/RadioSelectableDataTable" />
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue