breaking(data-table): use data attribute instead of id for table header/row (#1297)

Fixes #1294
This commit is contained in:
metonym 2022-05-13 20:18:32 -07:00 committed by GitHub
commit 6239c11024
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View file

@ -353,7 +353,7 @@
<TableBody>
{#each sorting ? displayedSortedRows : displayedRows as row, i (row.id)}
<TableRow
id="row-{row.id}"
data-row="{row.id}"
data-parent-row="{expandable ? true : undefined}"
class="{selectedRowIds.includes(row.id)
? 'bx--data-table--selected'

View file

@ -30,7 +30,7 @@
<th
aria-sort="{active ? $sortHeader.sortDirection : 'none'}"
scope="{scope}"
id="{id}"
data-header="{id}"
{...$$restProps}
on:mouseover
on:mouseenter
@ -61,7 +61,7 @@
{:else}
<th
scope="{scope}"
id="{id}"
data-header="{id}"
{...$$restProps}
on:click
on:mouseover