mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-20 04:13:02 +00:00
test: assert read-only arrays
This commit is contained in:
parent
eedc619900
commit
06f96638e5
4 changed files with 53 additions and 12 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