feat: search box in 404 page (#1081)

This commit is contained in:
Jimmy Cai
2024-10-20 00:26:59 +02:00
committed by GitHub
parent f4eb5d3e99
commit 37f1541c20
2 changed files with 46 additions and 1 deletions
+8 -1
View File
@@ -53,7 +53,14 @@ class Search {
this.resultTitle = resultTitle;
this.resultTitleTemplate = resultTitleTemplate;
this.handleQueryString();
/// Check if there's already value in the search input
if (this.input.value.trim() !== '') {
this.doSearch(this.input.value.split(' '));
}
else {
this.handleQueryString();
}
this.bindQueryStringChange();
this.bindSearchForm();
}