From 1d7ed48b4da5f8b64cf4b88048a13ee8f578fb12 Mon Sep 17 00:00:00 2001 From: kai Date: Thu, 4 Apr 2024 16:12:38 -0400 Subject: [PATCH] default search field to all --- src/components/SearchBar.js | 2 +- src/pages/HomePage.js | 2 +- src/pages/archives/ArchivePage.js | 4 ++-- src/pages/search/SearchLoader.js | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/components/SearchBar.js b/src/components/SearchBar.js index 1045f2a3..3ff54219 100644 --- a/src/components/SearchBar.js +++ b/src/components/SearchBar.js @@ -11,7 +11,7 @@ class SearchBar extends Component { q: this.props.q }; - fields = ["title", "description", "all"]; + fields = ["all", "description", "title"]; fieldOptions = () => { return this.fields.map((field) => ( diff --git a/src/pages/HomePage.js b/src/pages/HomePage.js index a1343e6f..f01ca71e 100644 --- a/src/pages/HomePage.js +++ b/src/pages/HomePage.js @@ -40,7 +40,7 @@ class HomePage extends Component { site={this.props.site} />
- +
diff --git a/src/pages/archives/ArchivePage.js b/src/pages/archives/ArchivePage.js index 006e0045..28391232 100644 --- a/src/pages/archives/ArchivePage.js +++ b/src/pages/archives/ArchivePage.js @@ -42,7 +42,7 @@ class ArchivePage extends Component { collectionTitle: "", page: 0, category: "archive", - searchField: "title", + searchField: "all", view: "Gallery", info: {}, languages: null, @@ -304,7 +304,7 @@ class ArchivePage extends Component { diff --git a/src/pages/search/SearchLoader.js b/src/pages/search/SearchLoader.js index 548455d0..0fce960c 100644 --- a/src/pages/search/SearchLoader.js +++ b/src/pages/search/SearchLoader.js @@ -18,7 +18,7 @@ class SearchLoader extends Component { page: 0, totalPages: 1, filters: {}, - field: "title", + field: "all", view: "Gallery", q: "", languages: null, @@ -138,7 +138,7 @@ class SearchLoader extends Component { } return { q: searchParams.get("q") || "", - field: searchParams.get("field") || "title", + field: searchParams.get("field") || "all", view: searchParams.get("view") || "Gallery", ...restQuery };