fix(data-table): prefix internal ID for radio button, checkbox

Fixes #2081
This commit is contained in:
Eric Liu 2025-01-07 16:36:30 -08:00
commit ada418a3b1
3 changed files with 28 additions and 2 deletions

View file

@ -0,0 +1,16 @@
<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} />