Skip to content

Commit

Permalink
fix: add overrideProps to Field component
Browse files Browse the repository at this point in the history
  • Loading branch information
bombguy committed Jun 6, 2023
1 parent b449387 commit 6393718
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24984,6 +24984,7 @@ export default function CreateProductForm(props) {
label={\\"Images\\"}
isRequired={false}
isReadOnly={false}
{...getOverrideProps(overrides, \\"imgKeys\\")}
>
<StorageManager
onUploadSuccess={({ key }) => {
Expand Down Expand Up @@ -25212,6 +25213,7 @@ export default function UpdateProductForm(props) {
label={\\"Images\\"}
isRequired={false}
isReadOnly={false}
{...getOverrideProps(overrides, \\"imgKeys\\")}
>
{productRecord && (
<StorageManager
Expand Down Expand Up @@ -25488,6 +25490,7 @@ export default function UpdateProductForm(props) {
descriptiveText={\\"Limited to One Image\\"}
isRequired={false}
isReadOnly={false}
{...getOverrideProps(overrides, \\"singleImgKey\\")}
>
{productRecord && (
<StorageManager
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -485,6 +485,15 @@ export const renderStorageFieldComponent = (
}
});

fieldAttributes.push(
factory.createJsxSpreadAttribute(
factory.createCallExpression(factory.createIdentifier('getOverrideProps'), undefined, [
factory.createIdentifier('overrides'),
factory.createStringLiteral(componentName),
]),
),
);

storageManagerAttributes.push(
factory.createJsxSpreadAttribute(
factory.createCallExpression(factory.createIdentifier('getOverrideProps'), undefined, [
Expand Down

0 comments on commit 6393718

Please sign in to comment.