-
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 complex options #2716
Combobox complex options #2716
Conversation
… with the allowNewValues prop, and simplify returning a value from onToggleSelected.
🦋 Changeset detectedLatest commit: d24b149 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 demoEndringer til review: 17dab96792 | 60 komponenter | 226 stories |
… Storybook-examples, as we have limited the format for now
# Conflicts: # @navikt/core/react/src/form/combobox/combobox.stories.tsx # yarn.lock
…lity function. Fixes missing checkmark for selected items in FilteredOptions.
…ese are outdated/unsynced, and will be inherited from parent package.json instead.
@navikt/core/react/src/form/combobox/FilteredOptions/filteredOptionsContext.tsx
Outdated
Show resolved
Hide resolved
@navikt/core/react/src/form/combobox/FilteredOptions/filteredOptionsContext.tsx
Outdated
Show resolved
Hide resolved
aksel.nav.no/website/pages/eksempler/combobox/with-complex-options.tsx
Outdated
Show resolved
Hide resolved
aksel.nav.no/website/pages/eksempler/combobox/with-complex-options.tsx
Outdated
Show resolved
Hide resolved
Co-authored-by: Halvor Haugan <[email protected]>
…ther of these return a value
… 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.
…ayToComboboxOptionArray)
…n't belong in the documentation
# Conflicts: # yarn.lock
…ptions, even if it didn't match the search text. This broke autocomplete.
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.
🚀 🚀 🚀 🚀 🚀
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 oldstring[]
options.