mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-15 18:31:06 +00:00
Merge pull request #329 from IBM/combobox-disabled
fix(combo-box): disabled combobox should not open
This commit is contained in:
commit
87908ffbd5
2 changed files with 2 additions and 2 deletions
|
@ -57,8 +57,7 @@ items={[
|
||||||
|
|
||||||
### Disabled
|
### Disabled
|
||||||
|
|
||||||
<ComboBox titleText="Contact" placeholder="Select contact method"
|
<ComboBox disabled titleText="Contact" placeholder="Select contact method"
|
||||||
disabled
|
|
||||||
items={[
|
items={[
|
||||||
{id: "0", text: "Slack"},
|
{id: "0", text: "Slack"},
|
||||||
{id: "1", text: "Email"},
|
{id: "1", text: "Email"},
|
||||||
|
|
|
@ -203,6 +203,7 @@
|
||||||
role="button"
|
role="button"
|
||||||
aria-expanded="{open}"
|
aria-expanded="{open}"
|
||||||
on:click="{() => {
|
on:click="{() => {
|
||||||
|
if (disabled) return;
|
||||||
open = true;
|
open = true;
|
||||||
}}"
|
}}"
|
||||||
id="{id}"
|
id="{id}"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue