Minor Changes
-
#4430
cf07d59587f
Thanks @aliemir! - Updated theuseForm
,useModalForm
,useDrawerForm
anduseStepsForm
to acceptqueryMeta
andmutationMeta
properties of theuseForm
hook of@refinedev/core
. These properties are used to pass specific meta values to the query or mutation. This is useful when you have overlapping values in your data provider'sgetOne
andupdate
methods. For example, you may want to change themethod
of the mutation toPATCH
but if you pass it in themeta
property, you'll end up changing the method of thegetOne
request as well.queryMeta
andmutationMeta
has precedence overmeta
. This means that if you have the same property inqueryMeta
andmeta
, the value inqueryMeta
will be used.Usage
import { useForm } from "@refinedev/core"; export const MyEditPage = () => { const form = useForm({ // this is passed both to the mutation and the query requests meta: { myValue: "myValue", }, // this is only passed to the query request queryMeta: { propertyOnlyWorksForQuery: "propertyOnlyWorksForQuery", }, // this is only passed to the mutation request mutationMeta: { propertyOnlyWorksForMutation: "propertyOnlyWorksForMutation", }, }); };
Patch Changes
-
#4429
63daabcb703
Thanks @aliemir! - Fixed the issue offormLoading
property in return values ofuseStepsForm
hook which was not being toggled correctly when the form was submitted or the form data was being fetched. -
#4431
c29a3618cf6
Thanks @aliemir! - Updated the TSDoc comments to fix the broken links in the documentation.