mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2026-01-06 23:02:45 +00:00
"Changed condition in onKeyDown event handler from checking input validity and value to checking searchButtonRef.current.disabled"
This commit is contained in:
@@ -178,7 +178,7 @@ const VaultPage = (props) => {
|
|||||||
pattern=".{3,}"
|
pattern=".{3,}"
|
||||||
onKeyDown={(e) => {
|
onKeyDown={(e) => {
|
||||||
if (e.key === 'Enter') {
|
if (e.key === 'Enter') {
|
||||||
if (e.target.validity.valid && e.target.value) {
|
if (!searchButtonRef.current.disabled) {
|
||||||
loadPage(1, true, true);
|
loadPage(1, true, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user