mirror of
https://github.com/wgh136/nysoure.git
synced 2025-09-27 12:17:24 +00:00
Close search dialog on input submission in SearchBar.
This commit is contained in:
@@ -382,6 +382,15 @@ function SearchBar() {
|
|||||||
className={"w-full"}
|
className={"w-full"}
|
||||||
onSubmit={(e) => {
|
onSubmit={(e) => {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
|
if (search.length === 0) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
const dialog = document.getElementById(
|
||||||
|
"search_dialog",
|
||||||
|
) as HTMLDialogElement;
|
||||||
|
if (dialog) {
|
||||||
|
dialog.close();
|
||||||
|
}
|
||||||
doSearch();
|
doSearch();
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
|
Reference in New Issue
Block a user