Minor Changes
-
#4430
cf07d59587f
Thanks @aliemir! - AddedqueryMeta
andmutationMeta
properties to theuseForm
hook. 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
-
#4430
cf07d59587f
Thanks @aliemir! - Fix missingmeta
values inuseForm
redirects after submission. -
#4431
c29a3618cf6
Thanks @aliemir! - Updated the TSDoc comments to fix the broken links in the documentation. -
#4426
0602f4cdf1c
Thanks @yildirayunlu! - fix:resource
parameter in thelegacyResourceTransform
helper is not optional but used as optional