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: prevent datetime from validating early #1121

Merged
merged 1 commit into from
Apr 5, 2024

Conversation

Skaiir
Copy link
Contributor

@Skaiir Skaiir commented Apr 4, 2024

Closes #1099

The root cause issue for this is the fact that the datetime component has a lot of funky synchronization code that leads to onChange being called when it initializes. The simplest and quickest way to fix this, is to not call onChange when newValue = oldValue, and it makes sense generally.

But ideally, we wouldn't want this logic branch to be called on init at all. Now I'm not sure I can fix this without a full refactor of datetime, and this component is a house of cards so my suggestion is, we take the easy fix for now, and I've raised this issue to provide a refactor to the component in the future.

@Skaiir
Copy link
Contributor Author

Skaiir commented Apr 5, 2024

I've got some test coverage for this in #1124

@Skaiir Skaiir merged commit 7c939d3 into main Apr 5, 2024
11 of 13 checks passed
@Skaiir Skaiir deleted the 1099-datetime-early-validation branch April 5, 2024 10:33
@bpmn-io-tasks bpmn-io-tasks bot removed the needs review Review pending label Apr 5, 2024
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.

2 participants