Replies: 1 comment 1 reply
-
You can use this example as a workaround😉. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Feature suggestion/ suggestion for modification:
The usage of a checkbox with v-model in combination with this true-value/ false-value "attributes" should not raise a TS error.
I am not claiming that this is a bug. I just wish these attributes would have been implemented differently.
It is good practice (if not unavoidable) to store booleans in MySQL as numbers (0/1 or 0/-1).
Numbers also take less space in - let's say - JSON.
The feature itself is working just fine. User input (clicking the checkbox) is written back nicely into my numeric variable which can unaltered be send back to the server. This is what the true-value/ false-value "attributes" are there for - right?
But it raises a typescript error. And now it has become a useful VUE feature I am forbidden to use since I switched to TS.
I beg you please change the behavior of these attributes so that the checkbox input/output is actually properly converted to the numbers specified in the attributes. (Or whatever is necessary to make TS shut up).
(I am not inclined to convert all boolean data to "true" / "false" strings or the like. This was suggested in discord.)
Thank you.
Beta Was this translation helpful? Give feedback.
All reactions