mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-16 02:41:05 +00:00
feat(data-table): support programmatic sorting (#1337)
* refactor(data-table): pass down sortable props instead of using context * feat(data-table): support programmatic sorting * test(data-table): assert new props * docs(data-table): add "Programmatic sorting" example * refactor(data-table): remove unused tableSortable store * refactor(data-table): remove unused indices
This commit is contained in:
parent
d2cdb8eb0f
commit
72c24b83b2
9 changed files with 241 additions and 48 deletions
|
@ -2421,6 +2421,30 @@
|
|||
"constant": false,
|
||||
"reactive": false
|
||||
},
|
||||
{
|
||||
"name": "sortKey",
|
||||
"kind": "let",
|
||||
"description": "Specify the header key to sort by",
|
||||
"type": "DataTableKey",
|
||||
"value": "null",
|
||||
"isFunction": false,
|
||||
"isFunctionDeclaration": false,
|
||||
"isRequired": false,
|
||||
"constant": false,
|
||||
"reactive": true
|
||||
},
|
||||
{
|
||||
"name": "sortDirection",
|
||||
"kind": "let",
|
||||
"description": "Specify the sort direction",
|
||||
"type": "\"none\" | \"ascending\" | \"descending\"",
|
||||
"value": "\"none\"",
|
||||
"isFunction": false,
|
||||
"isFunctionDeclaration": false,
|
||||
"isRequired": false,
|
||||
"constant": false,
|
||||
"reactive": true
|
||||
},
|
||||
{
|
||||
"name": "expandable",
|
||||
"kind": "let",
|
||||
|
@ -11843,9 +11867,33 @@
|
|||
"filePath": "src/DataTable/TableHeader.svelte",
|
||||
"props": [
|
||||
{
|
||||
"name": "disableSorting",
|
||||
"name": "sortable",
|
||||
"kind": "let",
|
||||
"description": "Set to `true` to disable sorting on this specific cell",
|
||||
"description": "Set to `true` for the sortable variant",
|
||||
"type": "boolean",
|
||||
"value": "false",
|
||||
"isFunction": false,
|
||||
"isFunctionDeclaration": false,
|
||||
"isRequired": false,
|
||||
"constant": false,
|
||||
"reactive": false
|
||||
},
|
||||
{
|
||||
"name": "sortDirection",
|
||||
"kind": "let",
|
||||
"description": "Specify the sort direction",
|
||||
"type": "\"none\" | \"ascending\" | \"descending\"",
|
||||
"value": "\"none\"",
|
||||
"isFunction": false,
|
||||
"isFunctionDeclaration": false,
|
||||
"isRequired": false,
|
||||
"constant": false,
|
||||
"reactive": false
|
||||
},
|
||||
{
|
||||
"name": "active",
|
||||
"kind": "let",
|
||||
"description": "Set to `true` if the column sorting",
|
||||
"type": "boolean",
|
||||
"value": "false",
|
||||
"isFunction": false,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue