0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2025-12-24 20:42:43 +00:00

"Changed condition in onKeyDown event handler from checking input validity and value to checking searchButtonRef.current.disabled"

This commit is contained in:
Víctor Losada Hernández
2024-07-27 10:46:08 +02:00
parent 5b96ef4406
commit 0bda666127

View File

@@ -178,7 +178,7 @@ const VaultPage = (props) => {
pattern=".{3,}"
onKeyDown={(e) => {
if (e.key === 'Enter') {
if (e.target.validity.valid && e.target.value) {
if (!searchButtonRef.current.disabled) {
loadPage(1, true, true);
}
}