mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-15 02:11:05 +00:00
breaking(types): type arrays as read-only (#1335)
Closes #1259 * breaking(types): type arrays as read-only * Run "yarn build:docs" * test: assert read-only arrays
This commit is contained in:
parent
1a904dda36
commit
260bf4e040
34 changed files with 257 additions and 192 deletions
|
@ -1,5 +1,13 @@
|
|||
<script lang="ts">
|
||||
import { MultiSelect } from "../types";
|
||||
import type { MultiSelectProps } from "../types/MultiSelect/MultiSelect.svelte";
|
||||
|
||||
let selectedIds: MultiSelectProps["selectedIds"] = [0];
|
||||
|
||||
$: {
|
||||
// @ts-expect-error
|
||||
selectedIds[0] = [0];
|
||||
}
|
||||
</script>
|
||||
|
||||
<MultiSelect
|
||||
|
@ -7,6 +15,7 @@
|
|||
titleText="Contact"
|
||||
label="Select contact methods..."
|
||||
hideLabel
|
||||
bind:selectedIds
|
||||
items="{[
|
||||
{ id: 0, text: 'Slack' },
|
||||
{ id: '1', text: 'Email' },
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue