mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-15 18:31:06 +00:00
fix(ComboBox): programmatically set selected index (#995)
* fix(ComboBox): programmatically set selected index * refactor(ComboBox): renaming example to Reactive example
This commit is contained in:
parent
8936b9b5fa
commit
d31e529ca9
3 changed files with 45 additions and 13 deletions
|
@ -3,7 +3,7 @@
|
|||
import { Button } from "carbon-components-svelte";
|
||||
import Preview from "../../components/Preview.svelte";
|
||||
let comboboxComponent
|
||||
|
||||
let selectedIndex = 1
|
||||
</script>
|
||||
|
||||
### Default
|
||||
|
@ -25,7 +25,12 @@ items={[
|
|||
{id: "2", text: "Fax"}
|
||||
]} />
|
||||
|
||||
### Reactive example
|
||||
|
||||
<FileSource src="/framed/ComboBox/ReactiveComboBox" />
|
||||
|
||||
### Clear selection
|
||||
|
||||
<ComboBox titleText="Contact" placeholder="Select contact method"
|
||||
bind:this={comboboxComponent}
|
||||
items={[
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue