@refinedev/mui@5.9.0
版本发布时间: 2023-07-18 20:46:34
refinedev/refine最新发布版本:@refinedev/supabase@5.9.4(2024-09-03 19:48:37)
Minor Changes
-
#4591
f8891ead2bd
Thanks @yildirayunlu! - feat:autoSave
feature forEdit
. useForm, useDrawerForm, useModalForm, useStepsForm hooks now acceptautoSave
object.enabled
is a boolean value anddebounce
is a number value in milliseconds.debounce
is optional and default value is1000
.const { autoSaveProps } = useForm({ refineCoreProps: { autoSave: { enabled: true, debounce: 2000, // not required, default is 1000 }, } }); return ( <Edit saveButtonProps={saveButtonProps} // pass autoSaveProps to Edit component autoSaveProps={autoSaveProps} > // form fields </Edit> );
feat: Add
<AutoSaveIndicator>
component. It comes automatically whenautoSaveProps
is given to theEdit
page. However, this component can be used to position it in a different place.import { AutoSaveIndicator } from "@refinedev/mui"; const { autoSaveProps } = useForm({ refineCoreProps: { autoSave: { enabled: true, debounce: 2000, // not required, default is 1000 }, } }); return ( <div> <AutoSaveIndicator {...autoSaveProps}> </div> );
Patch Changes
- Updated dependencies [
96af6d25b7a
,f8891ead2bd
]:- @refinedev/react-hook-form@4.6.0
- @refinedev/ui-types@1.20.0