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

UI Switch - More reliable onChange handler & accompanying E2E Test #493

Merged
merged 1 commit into from
Jan 17, 2024

Conversation

joepavitt
Copy link
Collaborator

Description

  • We previously had an @click event handler which watched the click event, then invertted the current value and emitted it. It would appear, for some reason that the @click handler sometimes ran after the underlying Vue tick had computed, and sometimes before.
  • I've changed this to a watch on the attached value to the switch, which guarantees we see an accurate value in the event handler, even on reload.

Related Issue(s)

Closes #457

Checklist

@joepavitt joepavitt merged commit 6875d7a into main Jan 17, 2024
2 checks passed
@joepavitt joepavitt deleted the 457-switch-inconsistencies branch January 17, 2024 09:50
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.

Switch with string or object output payloads gets confused when driven by input messages.
1 participant