Added a clear/reset button in InternalDateInput to reset/unschedule events (#3154)

* Added a clear/reset button in InternalDateInput to reset/unschedule events

* Added clearable prop to <InternalDateInput /> and fixed some design mistakes

* Removed unnecessary code that was used during debugging

* Replaced button with <MenuItem /> component

* Fixed null date in ObjectFilterDropdownDateSearchInput

* Moved clear context call from DateInput to DateFieldInput

* Removed useless props

---------

Co-authored-by: Lucas Bordeau <bordeau.lucas@gmail.com>
This commit is contained in:
Atharv Parlikar
2023-12-29 19:45:08 +05:30
committed by GitHub
parent fd607789f4
commit 97f83b55b0
11 changed files with 89 additions and 36 deletions

View File

@ -15,11 +15,13 @@ export const useFieldContext = ({
fieldMetadataName,
objectRecordId,
fieldPosition,
clearable,
}: {
objectNameSingular: string;
objectRecordId: string;
fieldMetadataName: string;
fieldPosition: number;
clearable?: boolean;
}) => {
const { objectMetadataItem } = useObjectMetadataItem({
objectNameSingular,
@ -60,6 +62,7 @@ export const useFieldContext = ({
}),
useUpdateRecord: useUpdateOneObjectMutation,
hotkeyScope: InlineCellHotkeyScope.InlineCell,
clearable,
}}
>
{children}