@refinedev/chakra-ui@2.22.0
版本发布时间: 2023-07-18 20:46:25
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/chakra-ui"; const { autoSaveProps } = useForm({ refineCoreProps: { autoSave: { enabled: true, debounce: 2000, // not required, default is 1000 }, } }); return ( <div> <AutoSaveIndicator {...autoSaveProps}> </div> );
Patch Changes
-
#4644
5da81a141bc
Thanks @yildirayunlu! - fix: broken layout on smaller screens. Addoverflow: auto
to layout content. -
Updated dependencies [
96af6d25b7a
,f8891ead2bd
]:- @refinedev/react-hook-form@4.6.0
- @refinedev/ui-types@1.20.0