Skip to content

model is changed to the opposite value if true and false values are reversed #3

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

Closed
kkyryl opened this issue Aug 18, 2021 · 1 comment

Comments

@kkyryl
Copy link

kkyryl commented Aug 18, 2021

This is an edge case :)

  • assume value 0 = "running", 1 = "not running" (rather than the usual 1 = running, 0 = not running)
  • isRunning: 0 in data()
  • <toggle v-model="isRunning" :trueValue="0" :falseValue="1"></toggle>
  • expected behavior: isRunning remains 0 until toggled
  • current behavior: when the component is rendered isRunning is immediately updated to 1. Test by removing Toggle component — isRunning remains 0.
@adamberecz
Copy link
Collaborator

Thanks @kkyryl that was a good point! Fixed in 2.0.1.

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

No branches or pull requests

2 participants