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 complex options #2716

Merged
merged 44 commits into from Mar 19, 2024
Merged

Combobox complex options #2716

merged 44 commits into from Mar 19, 2024

Conversation

it-vegard
Copy link
Contributor

@it-vegard it-vegard commented Feb 7, 2024

Description

Allow Combobox options as a list of objects, to support richer Options and separating the displayed label and the programmatical value used internally.

Change summary

Add support for Combobox.options as { label: "Some label", value: "a value" } in addition to the old string[] options.

Copy link

changeset-bot bot commented Feb 7, 2024

🦋 Changeset detected

Latest commit: d24b149

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 Minor
@navikt/ds-css Minor
@navikt/ds-tokens Minor
@navikt/ds-tailwind Minor
@navikt/aksel-icons Minor
@navikt/aksel Minor
@navikt/aksel-stylelint Minor

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 Feb 7, 2024

Storybook demo

Endringer til review: 1

7dab96792 | 60 komponenter | 226 stories

@it-vegard it-vegard marked this pull request as ready for review February 27, 2024 12:57
it-vegard and others added 23 commits March 5, 2024 15:45
Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>
… larger, and the SelectedOptions label uses a short code (the value)

Also made the isInList function better, by checking both label and value when checking ComboboxOptions. Pass just the value or just the label if you only want to check either of them.
…ptions, even if it didn't match the search text. This broke autocomplete.
HalvorHaugan
HalvorHaugan previously approved these changes Mar 11, 2024
Copy link
Collaborator

@KenAJoh KenAJoh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀 🚀 🚀 🚀 🚀

@it-vegard it-vegard merged commit 2ea2a91 into main Mar 19, 2024
3 checks passed
@it-vegard it-vegard deleted the combobox-complex-options branch March 19, 2024 12:47
@github-actions github-actions bot mentioned this pull request Mar 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants