Pressing [ENTER] on any input inside <form> element will toggle Downshift
See original GitHub issuedownshift
version: 1.16.1npm
(oryarn
) version: npm 5.5.1
Relevant code or config
const App = () => (
<form>
<input type='text'/>
<Downshift>
{({isOpen, getButtonProps}) => (
<div>
<button {...getButtonProps()}>
ay
</button>
{isOpen &&
<div>
Yo wassup
</div>
}
</div>
)}
</Downshift>
</form>
);
What you did: Pressing [ENTER] on any input inside <form> element
What happened: It will toggle Downshift content
What do I expect: It wonโt toggle the Downshift component when pressing [ENTER] inside form element.
Reproduction repository: https://codesandbox.io/s/pwn92r9plx
Suggested solution: I havenโt checked on the โwhyโ yet. Adding here first so I wonโt forget it. ๐
Issue Analytics
- State:
- Created 6 years ago
- Comments:12 (9 by maintainers)
Top Results From Across the Web
Allow Downshift useCombobox to select items not in the list
You need to take control of item selection: const { isOpen, selectItem, getToggleButtonProps, ... } Then call selectItem in an onClickย ...
Read more >Building accessible components with Downshift
Downshift is a JavaScript library for building flexible, enhanced input components in React that comply with WAI-ARIA regulations.
Read more >Props used in examples - Downshift
A combobox element can be created with HTML elements such as a: label, ul, li, button, input and a div or something similar...
Read more >Examples - Final Form Docs
Demonstrates how to make an independent Error component, using Hooks, to subscribe to and display the error for any form field. Loading and...
Read more >Keyboard shortcuts for Access - Microsoft Support
Switch to the Form View from the form in the Design View. F5. Move to the next or previous field ... Every command...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
๐๐ฅโ First Timers Only This issue is reserved for people who never contributed to Open Source before. We know that the process of creating a pull request is the biggest barrier for new contributors. This issue is for you ๐
About First Timers Only.
๐ค What you will need to know Nothing. This issue is meant to welcome you to Open Source ๐ We are happy to walk you trough the process.
๐ Step by Step
downshift.js
in the this repo by following the steps in the CONTRIBUTING.md guide. Please addtype: 'button'
above this line.closes #315
in the description. If this is your first, welcome ๐ ๐ Here is a great tutorial on how to send a pull request using the terminal.๐คโ Questions? Comment here ๐
Congratulations @xutopia!