mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-14 18:01:06 +00:00
fix(data-table): prefix internal ID for radio button, checkbox (#2082)
Fixes #2081
This commit is contained in:
parent
f3a8d9972c
commit
dd6cbac3ee
3 changed files with 37 additions and 2 deletions
19
tests/DataTable/DuplicateDataTables.test.svelte
Normal file
19
tests/DataTable/DuplicateDataTables.test.svelte
Normal file
|
@ -0,0 +1,19 @@
|
|||
<script lang="ts">
|
||||
import { DataTable } from "carbon-components-svelte";
|
||||
|
||||
const headers = [
|
||||
{ key: "id", value: "id" },
|
||||
{ key: "contact.company", value: "Company name" },
|
||||
] as const;
|
||||
|
||||
const rows = [
|
||||
{ id: "1", contact: { company: "Company 1" } },
|
||||
{ id: "2", contact: { company: "Company 2" } },
|
||||
];
|
||||
</script>
|
||||
|
||||
<DataTable radio {headers} {rows} />
|
||||
<DataTable radio {headers} {rows} />
|
||||
|
||||
<DataTable batchSelection selectable {headers} {rows} />
|
||||
<DataTable batchSelection selectable {headers} {rows} />
|
Loading…
Add table
Add a link
Reference in a new issue