-
-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
Not possible to use Symbol value for checkbox true-value #10597
Comments
To explain the use case here: I have some user supplied values (strings) I use for checkbox values, but I also want to include checkboxes for special system values (like "all", "none", etc.). So that there is no overlap/conflict between strings, I wanted to use Symbols for system values. I could find some other way escape those strings (like a prefix), but Symbols look to me like the perfect solution available in the language for this. |
|
It's incorrect, unfortunately. |
I apologize. If possible, could you also share the reason why Symbol cannot be used? I would like to learn more about it. |
add a pull request to fix this: #10608 |
for #10598 |
Vue version
3.4.21
Link to minimal reproduction
https://play.vuejs.org/#eNp9UctOwzAQ/JWVLy1SHwc4RW2lgnoAIUAUOPmSppvi4tiWH6FVlH9n7fR1QL15Z2Z3Z9YNmxszqgOyjE1cYYXx4NAHM+NKVEZbDw1YLKGF0uoKeiTtccVVoZXz8DV//lzAFJb7aqVln7MEcHZzltS5DEgSGtJXQUqiJuNuE+2gwmNlZO6RKoCJUCZ48HuDU86Kbyx+VnrHGdTDSq9REpgGEpJ5G3CYKkIPiyErc+nOcNxI6Lgbvhb1rGkOltp2Mo5A9HPhgQ2Yd2S9FJvR1mlFh2liM7nRlRES7avxgqJxlkFiIpdLqX+fEhZtDY54SvAPvnUUKqPHm0WHtqZAJ87ndoO+oxfLF9zR+0TSFYIk9RXyHZ2WIXrsZPdBrcn2hS65fUzfK9Tmwy12HpU7hopGo7JNejp4wIcr0c92b0d3qY+rlrV/0cLIbw==
Steps to reproduce
Try to use a symbol for
true-value
for a checkbox input.What is expected?
That it works and that v-model gets the symbol value when checkbox is checked.
What is actually happening?
Browser complains that it cannot convert Symbol to a string:
Cannot convert a Symbol value to a string
.System Info
No response
Any additional comments?
No response
The text was updated successfully, but these errors were encountered: