Use editedRecord in hook useEntityRecord
This commit is contained in:
parent
d4716a27b7
commit
c28e005e7b
|
@ -155,7 +155,7 @@ export function BlockEditor( {
|
|||
{ postType }
|
||||
);
|
||||
|
||||
const { record: product } = useEntityRecord< Product >(
|
||||
const { editedRecord: product } = useEntityRecord< Product >(
|
||||
'postType',
|
||||
postType,
|
||||
productId
|
||||
|
|
|
@ -60,7 +60,7 @@ export function useProductVariationsHelper() {
|
|||
'id'
|
||||
);
|
||||
|
||||
const { record: product } = useEntityRecord< Product >(
|
||||
const { editedRecord: product } = useEntityRecord< Product >(
|
||||
'postType',
|
||||
'product',
|
||||
productId
|
||||
|
|
|
@ -23,5 +23,5 @@ declare module '@wordpress/core-data' {
|
|||
kind: string,
|
||||
name: string,
|
||||
id: number | string
|
||||
): { record: T };
|
||||
): { record: T, editedRecord: T };
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue