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(ui-date-time-input): fix DateTimeInput displaying wrong value of its value is changed in a onChange callback #1833

Merged
merged 1 commit into from
Dec 19, 2024

Conversation

matyasf
Copy link
Collaborator

@matyasf matyasf commented Dec 19, 2024

Closes: INSTUI-4406

I could only repropduce it in CodeSandbox, but according to React documentation setState is not deterministic. Backport of PR #1829 from InstUI v10

TEST PLAN:
Make a DateTimeInput whose value changes in an onChange listener on CodeSandbox. It should update properly

…its value is changed in a onChange callback

Closes: INSTUI-4406

I could only repropduce it in CodeSandbox, but according to React documentation setState is not
deterministic. Backport of PR #1829 from InstUI v10
TEST PLAN:
Make a DateTimeInput whose value changes in an onChange listerer on CodeSandbox. It should update
properly
@matyasf matyasf self-assigned this Dec 19, 2024
@matyasf matyasf requested review from balzss and HerrTopi December 19, 2024 10:29
Copy link
Contributor

@balzss balzss left a comment

Choose a reason for hiding this comment

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

looks good. can you also include the changes from #1826 please? thanks!

Copy link

github-actions bot commented Dec 19, 2024

PR Preview Action v1.4.8
Preview removed because the pull request was closed.
2024-12-19 13:58 UTC

@matyasf
Copy link
Collaborator Author

matyasf commented Dec 19, 2024

looks good. can you also include the changes from #1826 please? thanks!

I'll do that in a different PR

@matyasf matyasf merged commit 5cc4692 into v9_maintenance Dec 19, 2024
6 checks passed
@matyasf matyasf deleted the datetimeinput_onchange_fix_v9 branch December 19, 2024 13:58
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.

3 participants