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: placeholder fix #3101

Merged
merged 6 commits into from
Aug 15, 2024
Merged

🩹 Combobox: placeholder fix #3101

merged 6 commits into from
Aug 15, 2024

Conversation

larseirikhansen
Copy link
Contributor

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.

Copy link

changeset-bot bot commented Aug 15, 2024

🦋 Changeset detected

Latest commit: dbd5b38

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 7 packages
Name Type
@navikt/ds-react Patch
@navikt/ds-css Patch
@navikt/ds-tokens Patch
@navikt/ds-tailwind Patch
@navikt/aksel-icons Patch
@navikt/aksel Patch
@navikt/aksel-stylelint Patch

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

Copy link
Contributor

github-actions bot commented Aug 15, 2024

Storybook demo

86990f26a | 88 komponenter | 139 stories

<UNSAFE_Combobox {...props} id="combobox" />
<UNSAFE_Combobox
{...props}
maxSelected={{ limit: Number(props.maxSelected) }}
Copy link
Contributor

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?

Copy link
Contributor Author

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 👍

@larseirikhansen larseirikhansen changed the title Combobox placeholder fix 🩹 Combobox: placeholder fix Aug 15, 2024
@larseirikhansen larseirikhansen merged commit 4e76298 into main Aug 15, 2024
4 checks passed
@larseirikhansen larseirikhansen deleted the combobox-placeholder branch August 15, 2024 12:42
@github-actions github-actions bot mentioned this pull request Aug 15, 2024
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

Successfully merging this pull request may close these issues.

3 participants