From 00c8fd83dff9cd9b481995412581e07a076e55a4 Mon Sep 17 00:00:00 2001 From: Alessandro Cuppari Date: Mon, 1 Apr 2024 19:32:30 +0100 Subject: [PATCH] fix: reset date to empty string instead of null Closes #297 --- .../src/components/inputs/MRT_FilterTextInput.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/mantine-react-table/src/components/inputs/MRT_FilterTextInput.tsx b/packages/mantine-react-table/src/components/inputs/MRT_FilterTextInput.tsx index a862f830d..74b7460ba 100644 --- a/packages/mantine-react-table/src/components/inputs/MRT_FilterTextInput.tsx +++ b/packages/mantine-react-table/src/components/inputs/MRT_FilterTextInput.tsx @@ -318,6 +318,7 @@ export const MRT_FilterTextInput = ({ popoverProps={{ withinPortal: columnFilterDisplayMode !== 'popover' }} {...dateInputProps} className={clsx(className, dateInputProps.className)} + onChange={(event) => commonProps.onChange(event === null ? '' : event)} ref={(node) => { if (node) { filterInputRefs.current[`${column.id}-${rangeFilterIndex ?? 0}`] =