Skip to content

Commit

Permalink
fix:Handling dashboard saved filters for old filters
Browse files Browse the repository at this point in the history
  • Loading branch information
praveen5959 committed Dec 6, 2024
1 parent 59161e2 commit c055b60
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/pages/Stream/components/Querier/SavedFiltersModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,16 @@ const SavedFilterItem = (props: {

const onApplyFilters = useCallback(() => {
if (location.pathname.includes('dashboard')) {
setFilterStore((store) => setAppliedFilterQuery(store, query.filter_query));
if (query.filter_query) {
setFilterStore((store) => setAppliedFilterQuery(store, query.filter_query));
} else if (query.filter_builder) {
setFilterStore((store) =>
setAppliedFilterQuery(
store,
parseQuery(props.queryEngine, query.filter_builder as QueryType, stream_name).parsedQuery,
),
);
}
setFilterStore((store) => toggleSavedFiltersModal(store, false));
} else {
if (query.filter_query) {
Expand Down

0 comments on commit c055b60

Please sign in to comment.