mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-14 18:01:06 +00:00
feat(data-table): support radio, selectable variants with batch actions
This commit is contained in:
parent
611d72bcf3
commit
f43b132088
15 changed files with 662 additions and 156 deletions
40
types/index.d.ts
vendored
40
types/index.d.ts
vendored
|
@ -849,6 +849,31 @@ export class DataTable extends CarbonSvelteComponent {
|
|||
*/
|
||||
expandedRowIds?: string[];
|
||||
|
||||
/**
|
||||
* Set to `true` for the radio selection variant
|
||||
* @default false
|
||||
*/
|
||||
radio?: boolean;
|
||||
|
||||
/**
|
||||
* Set to `true` for the selectable variant
|
||||
* Automatically set to `true` if `radio` or `batchSelection` are `true`
|
||||
* @default false
|
||||
*/
|
||||
selectable?: boolean;
|
||||
|
||||
/**
|
||||
* Set to `true` to enable batch selection
|
||||
* @default false
|
||||
*/
|
||||
batchSelection?: boolean;
|
||||
|
||||
/**
|
||||
* Specify the row ids to be selected
|
||||
* @default []
|
||||
*/
|
||||
selectedRowIds?: string[];
|
||||
|
||||
/**
|
||||
* Set to `true` to enable a sticky header
|
||||
* @default false
|
||||
|
@ -5091,6 +5116,21 @@ export class Toolbar extends CarbonSvelteComponent {
|
|||
$$slot_def: { default: {} };
|
||||
}
|
||||
|
||||
export class ToolbarBatchActions extends CarbonSvelteComponent {
|
||||
$$prop_def: {
|
||||
/**
|
||||
* Override the total items selected text
|
||||
*/
|
||||
formatTotalSelected?: (totalSelected: number) => string;
|
||||
};
|
||||
|
||||
$$slot_def: { default: {} };
|
||||
}
|
||||
|
||||
export class ToolbarContent extends CarbonSvelteComponent {
|
||||
$$slot_def: { default: {} };
|
||||
}
|
||||
|
||||
export class ToolbarSearch extends CarbonSvelteComponent {
|
||||
$$prop_def: {
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue