mirror of
https://github.com/wassname/stampy-chat.git
synced 2026-09-11 12:50:34 +08:00
fix searchbar
This commit is contained in:
@@ -79,7 +79,7 @@ const SearchBoxInternal: React.FC<{
|
||||
setLoading(true);
|
||||
const controller = new AbortController();
|
||||
setController(controller);
|
||||
search(query, "search", enable(controller), controller);
|
||||
search(query, searchtype, enable(controller), controller);
|
||||
};
|
||||
const cancelSearch = () => controller.abort();
|
||||
|
||||
@@ -119,7 +119,7 @@ const SearchBoxInternal: React.FC<{
|
||||
// if <enter> without <shift>, submit the form (if it's not empty)
|
||||
if (e.key === "Enter" && !e.shiftKey) {
|
||||
e.preventDefault();
|
||||
runSearch(query, "search");
|
||||
runSearch(query, "search")();
|
||||
}
|
||||
}}
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user