diff --git a/packages/core/src/types.ts b/packages/core/src/types.ts index bdc43b1a..fdd279f8 100644 --- a/packages/core/src/types.ts +++ b/packages/core/src/types.ts @@ -333,6 +333,7 @@ export type WidgetComponentProps = { id: ExternalReference["id"]; onChange: (newId: ExternalReference["id"]) => void; params?: Record; + field: Field; }; export type InlineTypeWidgetComponentProps< @@ -341,6 +342,7 @@ export type InlineTypeWidgetComponentProps< value: Type; onChange: (newValue: Type) => void; params?: Record; + field: Field; }; export type TokenTypeWidgetComponentProps< diff --git a/packages/editor/src/tinacms/fields/plugins/ExternalField/ExternalField.tsx b/packages/editor/src/tinacms/fields/plugins/ExternalField/ExternalField.tsx index 94ad9564..989f7c38 100644 --- a/packages/editor/src/tinacms/fields/plugins/ExternalField/ExternalField.tsx +++ b/packages/editor/src/tinacms/fields/plugins/ExternalField/ExternalField.tsx @@ -130,6 +130,7 @@ const ExternalFieldComponent = (props: ExternalFieldProps) => { }} path={fieldNames[0]} params={field.schemaProp.params} + field={field} /> ) : ( diff --git a/packages/editor/src/tinacms/fields/plugins/LocalFIeld.tsx b/packages/editor/src/tinacms/fields/plugins/LocalFIeld.tsx index 1c470485..be7e337a 100644 --- a/packages/editor/src/tinacms/fields/plugins/LocalFIeld.tsx +++ b/packages/editor/src/tinacms/fields/plugins/LocalFIeld.tsx @@ -57,6 +57,7 @@ const LocalFieldPlugin = { params={ "params" in field.schemaProp ? field.schemaProp.params : undefined } + field={field} /> ); }), diff --git a/packages/editor/src/tinacms/fields/plugins/TokenField/TokenFieldPlugin.tsx b/packages/editor/src/tinacms/fields/plugins/TokenField/TokenFieldPlugin.tsx index 3bb27ed3..7cd6aae7 100644 --- a/packages/editor/src/tinacms/fields/plugins/TokenField/TokenFieldPlugin.tsx +++ b/packages/editor/src/tinacms/fields/plugins/TokenField/TokenFieldPlugin.tsx @@ -254,6 +254,7 @@ function TokenFieldComponent({ params={ "params" in field.schemaProp ? field.schemaProp.params : undefined } + field={field} /> ) : (