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:
@ -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}
|
||||
|
||||
Reference in New Issue
Block a user