Skip to content

Commit 57e859a

Browse files
mirekmlkostrowski
andauthored
Fix/variant optional attributes (#6300)
* Force remount of the form when variantid changes to reset its state * Add changeset --------- Co-authored-by: Lukasz Ostrowski <lukasz.ostrowski@saleor.io>
1 parent cee423f commit 57e859a

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

.changeset/easy-beans-notice.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"saleor-dashboard": patch
3+
---
4+
5+
Fix variant form initialisation

src/products/components/ProductVariantPage/ProductVariantPage.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -246,6 +246,7 @@ export const ProductVariantPage = ({
246246
</TopNav>
247247
<DetailPageLayout.Content>
248248
<ProductVariantUpdateForm
249+
key={variant?.id}
249250
variant={variant}
250251
onSubmit={onSubmit}
251252
currentChannels={channels}

0 commit comments

Comments
 (0)