Skip to content

Commit

Permalink
add extended selection (#5286)
Browse files Browse the repository at this point in the history
  • Loading branch information
benjaminpkane authored Dec 17, 2024
1 parent 1ddd2bf commit f704079
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion app/packages/state/src/recoil/filters.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import {
import { VALID_PRIMITIVE_TYPES } from "@fiftyone/utilities";
import { DefaultValue, selectorFamily } from "recoil";
import { getSessionRef, sessionAtom } from "../session";
import { extendedSelection } from "./atoms";
import { pathHasIndexes, queryPerformance } from "./queryPerformance";
import { expandPath, fields } from "./schema";
import { hiddenLabelIds, isFrameField } from "./selectors";
Expand Down Expand Up @@ -107,8 +108,10 @@ export const hasFilters = selectorFamily<boolean, boolean>({
({ get }) => {
const f = Object.keys(get(modal ? modalFilters : filters)).length > 0;
const hidden = Boolean(modal && get(hiddenLabelIds).size);
const selection =
!modal && Boolean(get(extendedSelection)?.selection?.length);

return f || hidden;
return f || hidden || selection;
},
});

Expand Down

0 comments on commit f704079

Please sign in to comment.