box-ui-elements
box-ui-elements copied to clipboard
SearchForm search button is not interactive
Reported by Boxer, created on their behalf: "Nothing happens when clicking on the magnifying glass in the [ContextExplorerModal]"
Digging into the code a little, this resolves to the type
attribute on the button which renders the magnifying glass being button
instead of submit
on this line: https://github.com/box/box-ui-elements/blob/ef674ae9124b74126ae11b729e074cf8658c15a5/src/components/search-form/SearchForm.js#L168
Resolution is trivial, 1 line change, but I'm not sure the provenance of using type=button
in the first place.
Agree with changing the <button/>
type
to a submit
. The unit test needs to be updated to simulate clicking on the button and not invoking the submit event directly https://github.com/box/box-ui-elements/blob/ef674ae9124b74126ae11b729e074cf8658c15a5/src/components/search-form/tests/SearchForm.test.js#L66