-
Notifications
You must be signed in to change notification settings - Fork 42
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: placeholder fix #3101
Conversation
🦋 Changeset detectedLatest commit: dbd5b38 The changes in this PR will be included in the next version bump. This PR includes changesets to release 7 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Storybook demo86990f26a | 88 komponenter | 139 stories |
<UNSAFE_Combobox {...props} id="combobox" /> | ||
<UNSAFE_Combobox | ||
{...props} | ||
maxSelected={{ limit: Number(props.maxSelected) }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hvorfor maxSelected på default-eksempelet?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tried to test edge cases, like having that prop active in Storybook. But it didn't work from the Storybook-controls, so that was the fix 👍
Co-authored-by: Halvor Haugan <[email protected]>
Description
Original issue afaik: https://nav-it.slack.com/archives/C7NE7A8UF/p1714377788972099
With this fix, the placeholder of the Combobox input-element is no longer visible if the user has added a value to selectedOptions (i.e. picked a value from the dropdown or added a custom value). This took a while because of internal discussions of the placeholder prop in Combobox.