Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Allow variant fields to be updated on page refresh #174

Merged

Conversation

trojanh
Copy link
Contributor

@trojanh trojanh commented Jan 7, 2020

Signed-off-by: trojanh rajan.tiwari@kiprosh.com

Resolves #173
Impact: breaking|major
Type: bugfix

Issue

Refreshing variants page causes all the fields to be reset and throws 400 error because of the null variantId.

Solution

Initialize variantId in UNSAFE_componentWillReceiveProps

Breaking changes

none

Testing

  1. Visit product variants page and refresh the page
  2. Edit any input field,
  3. Observe that 400 error is thrown and all the inputs get empty

Signed-off-by: trojanh <rajan.tiwari@kiprosh.com>
@willopez willopez self-requested a review January 9, 2020 00:45
Copy link
Member

@willopez willopez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@willopez willopez merged commit 4fa80e1 into reactioncommerce:trunk Jan 9, 2020
@kieckhafer kieckhafer mentioned this pull request Feb 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[v3.0.0] Cannot Update Product variant on refresh
2 participants