mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-15 02:11:05 +00:00
breaking(data-table): use data attribute instead of id for table header/row (#1297)
Fixes #1294
This commit is contained in:
parent
7c4842f506
commit
6239c11024
2 changed files with 3 additions and 3 deletions
|
@ -353,7 +353,7 @@
|
||||||
<TableBody>
|
<TableBody>
|
||||||
{#each sorting ? displayedSortedRows : displayedRows as row, i (row.id)}
|
{#each sorting ? displayedSortedRows : displayedRows as row, i (row.id)}
|
||||||
<TableRow
|
<TableRow
|
||||||
id="row-{row.id}"
|
data-row="{row.id}"
|
||||||
data-parent-row="{expandable ? true : undefined}"
|
data-parent-row="{expandable ? true : undefined}"
|
||||||
class="{selectedRowIds.includes(row.id)
|
class="{selectedRowIds.includes(row.id)
|
||||||
? 'bx--data-table--selected'
|
? 'bx--data-table--selected'
|
||||||
|
|
|
@ -30,7 +30,7 @@
|
||||||
<th
|
<th
|
||||||
aria-sort="{active ? $sortHeader.sortDirection : 'none'}"
|
aria-sort="{active ? $sortHeader.sortDirection : 'none'}"
|
||||||
scope="{scope}"
|
scope="{scope}"
|
||||||
id="{id}"
|
data-header="{id}"
|
||||||
{...$$restProps}
|
{...$$restProps}
|
||||||
on:mouseover
|
on:mouseover
|
||||||
on:mouseenter
|
on:mouseenter
|
||||||
|
@ -61,7 +61,7 @@
|
||||||
{:else}
|
{:else}
|
||||||
<th
|
<th
|
||||||
scope="{scope}"
|
scope="{scope}"
|
||||||
id="{id}"
|
data-header="{id}"
|
||||||
{...$$restProps}
|
{...$$restProps}
|
||||||
on:click
|
on:click
|
||||||
on:mouseover
|
on:mouseover
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue