Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Combobox has issues when value bound #1143

Open
Tracked by #1679
pjebs opened this issue Mar 2, 2022 · 0 comments
Open
Tracked by #1679

Combobox has issues when value bound #1143

pjebs opened this issue Mar 2, 2022 · 0 comments

Comments

@pjebs
Copy link

pjebs commented Mar 2, 2022

I'm trying to allow users to add custom values to a Combobox. It is normal functionality of how a combobox should operate. Unforunatly Carbon doesn't allow it: carbon-design-system/carbon#6102

So as a workaround:

<script>
let newCharacterName = '';

</script>

<ComboBox
		  titleText="Name"
		  bind:value={newCharacterName}
		  items={[...]}
/>

It turns out that if newCharacterName is initially set to '', then Combobox will still show the first item in the list.
However, newCharacterName is still ''. This means that the user is confused.
The user has to drop down list selected another item AND then select the original item again for newCharacterName to properly reflect the value displayed by the comboBox.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant