Minor Changes
-
#4914
91a4d0da9f1
Thanks @yildirayunlu! - feat:optimisticUpdateMap
prop added touseForm
hook. This prop allows you to update the data in the cache.useForm({ mutationMode: "optimistic", optimisticUpdateMap: { list: true, many: true, detail: (previous, values, id) => { if (!previous) { return null; } const data = { id, ...previous.data, ...values, foo: "bar", }; return { ...previous, data, }; }, }, });
Patch Changes
-
#4903
e327cadc011
Thanks @yildirayunlu! - fix: when usinguseForm
,autoSave
parameters not passed to@refinedev/core/useForm
hook.
From now on, you can useautoSave
parameters inuseForm
hook.feat: add
invalidateOnUnmount
prop touseForm
hook.
feat: addinvalidateOnUnmount
andinvalidateOnClose
prop touseModalForm
anduseDrawerForm
hooks.
From now on, you can use the use this props to invalidate queries upon unmount or close.