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 clearing tx initial message before the page change is made #861

Merged
merged 3 commits into from
Jul 9, 2018

Conversation

lyyder
Copy link
Contributor

@lyyder lyyder commented Jul 5, 2018

Fixes a UI bug on checkout page where the initial message input is cleared slightly before the page changes to the tx page.

Before:
message_blink_before

After:
message_blink_after

The state initialization is performed when the component goes into
submittin mode. However, after the form is submitted, the component
unmounts and the state is destroyed.
@lyyder lyyder requested a review from Gnito July 5, 2018 16:41
@lyyder
Copy link
Contributor Author

lyyder commented Jul 5, 2018

Now the state is not cleared during submit. A question is that if some values, like token, should be cleared on submit.

Copy link
Contributor

@Gnito Gnito left a comment

Choose a reason for hiding this comment

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

Props change at least when inProgress changes in CheckoutPage. That would mean that possible errors are not shown when spinner is rotating on the submit button.

To fix this, you could add extra check when to show errors.
this.state.error && !submitInProgress ? ...

@lyyder lyyder merged commit 7ada1d9 into master Jul 9, 2018
@lyyder lyyder deleted the initial-message-blink branch July 9, 2018 12:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants