Explore sorting (#15342)

* backend

* add type and params

* radio group in ui

* ensure search_type is cleared on reset
This commit is contained in:
Josh Hawkins
2024-12-04 09:54:10 -06:00
committed by GitHub
parent a5a7cd3107
commit c0ba98e26f
6 changed files with 241 additions and 15 deletions

View File

@@ -18,6 +18,7 @@ import {
FilterType,
SavedSearchQuery,
SearchFilter,
SearchSortType,
SearchSource,
} from "@/types/search";
import useSuggestions from "@/hooks/use-suggestions";
@@ -323,6 +324,9 @@ export default function InputWithTags({
case "event_id":
newFilters.event_id = value;
break;
case "sort":
newFilters.sort = value as SearchSortType;
break;
default:
// Handle array types (cameras, labels, subLabels, zones)
if (!newFilters[type]) newFilters[type] = [];