Skip to content
Snippets Groups Projects
Unverified Commit a65774b1 authored by Ryan Laurie's avatar Ryan Laurie Committed by GitHub
Browse files

show date empty and not empty (#24240)

parent 73e7b965
No related branches found
No related tags found
No related merge requests found
......@@ -7,7 +7,7 @@ import StructuredQuery, {
import Filter from "metabase-lib/lib/queries/structured/Filter";
import Dimension from "metabase-lib/lib/Dimension";
import { isBoolean } from "metabase/lib/schema_metadata";
import { isBoolean, isDate } from "metabase/lib/schema_metadata";
import TippyPopoverWithTrigger from "metabase/components/PopoverWithTrigger/TippyPopoverWithTrigger";
import { DateShortcutOptions } from "metabase/query_builder/components/filters/pickers/DatePicker/DatePickerShortcutOptions";
......@@ -48,12 +48,13 @@ export const BulkFilterSelect = ({
return getNewFilter(query, dimension);
}, [query, dimension]);
const hideArgumentSelector = [
"is-null",
"not-null",
"is-empty",
"not-empty",
].includes(filter?.operatorName());
const isDateField = useMemo(() => isDate(dimension?.field()), [dimension]);
const hideArgumentSelector =
!isDateField &&
["is-null", "not-null", "is-empty", "not-empty"].includes(
filter?.operatorName(),
);
if (hideArgumentSelector) {
return null;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment