Fixed page reload issue on EnterKey press

This commit is contained in:
monilprajapati
2024-06-17 12:24:32 +05:30
parent e4dd9a53f2
commit 1296af8786
6 changed files with 32 additions and 2 deletions
+10
View File
@@ -232,6 +232,11 @@ const AppGrid = (props) => {
removeQuery("q");
refine(event.currentTarget.value);
}}
onKeyDown={(event) => {
if(event.key === "Enter") {
event.preventDefault();
}
}}
limit={5}
/>
{/*isSearchStalled ? 'My search is stalled' : ''*/}
@@ -994,6 +999,11 @@ const AppGrid = (props) => {
onChange={(event) => {
setSearchQuery(event.currentTarget.value);
}}
onKeyDown={(event) => {
if(event.key === "Enter") {
event.preventDefault();
}
}}
limit={5}
/>
{/*isSearchStalled ? 'My search is stalled' : ''*/}