Skip to content

Commit

Permalink
fix modal not rendering properly in qp mode (#5076)
Browse files Browse the repository at this point in the history
  • Loading branch information
CamronStaley authored Nov 8, 2024
1 parent c2d05fb commit 3ae950e
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ const NumericFieldFilter = ({ color, modal, named = true, path }: Props) => {
setShowRange(true);
};

const showButton = isGroup && queryPerformance && !showRange;
const showButton = isGroup && queryPerformance && !showRange && !modal;

return (
<Container onClick={(e) => e.stopPropagation()}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,9 @@ const useValues = ({
const boolean = useRecoilValue(isBooleanField(path));

const hasCheckboxResults =
(!queryPerformance && counts.size <= CHECKBOX_LIMIT && !objectId) ||
((!queryPerformance || modal) &&
counts.size <= CHECKBOX_LIMIT &&
!objectId) ||
skeleton ||
boolean;

Expand Down
4 changes: 2 additions & 2 deletions app/packages/state/src/recoil/pathFilters/numeric.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import * as filterAtoms from "../filters";
import * as pathData from "../pathData";
import type { Range } from "../utils";
import { isFilterDefault } from "./utils";
import { pathHasIndexes, queryPerformance } from "../queryPerformance";
import { queryPerformance } from "../queryPerformance";

export interface NumericFilter {
range: Range;
Expand Down Expand Up @@ -147,7 +147,7 @@ export const boundsAtom = selectorFamily<
get:
(params) =>
({ get }) => {
if (get(queryPerformance)) {
if (get(queryPerformance) && !params.modal) {
return get(pathData.lightningBounds(params.path));
}

Expand Down

0 comments on commit 3ae950e

Please sign in to comment.