-
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
Bugfix/prevent submit on enter in combobox #2861
Conversation
🦋 Changeset detectedLatest commit: 9b1c8b7 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 demobbe0620b6 | 61 komponenter | 202 stories |
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.
🚀 Ser ut til å fungere bra 🚀
Bare et åpent sprøsmål, men bør enter i teorien submitte form så lenge Enter ikke har en annen handling? Så i tilfellene
- Input er tomt, popover er lukket
- Du har valgt et element (f.eks banana), og trykker så enter etter det
- Autocomplete er tomt, popover er lukket etc
- Sikkert flere caser
Blir raskt en ganske kompleks sjekk onEnter, så kanskje aller enkleste er å bare ignorere disse edgecasene og bare kjøre på med foreslått løsning i PR-en
…ot submitting the form
…other action (like selecting an option)
… to the chips in the previous step
… open/close button didn't work
@navikt/core/react/src/form/combobox/SelectedOptions/SelectedOptions.tsx
Outdated
Show resolved
Hide resolved
…side effects, but we need to remove virtual focus at least. That way we won't double-click on enter.
…eed to click the toggleIsOpen button to check that the option is un-selected
Co-authored-by: Ken <26967723+KenAJoh@users.noreply.github.com>
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
Presently, pressing enter inside of Combobox will trigger onSubmit if it is inside of a form (as it should be).
Fixed #2808
Change summary
Preventing submit on Enter-presses inside of Combobox.