Open tanbowensg opened 3 years ago
Maybe we can add some test cases in this issue to describe the desired behavior?
For example:
1
-> Number: 1
'1'
-> String '1'
{{ 1 }}
-> Number: 1
{{ '1' }}
-> String '1'
cc @chenenpei
The 4 cases mentioned above are desired, while the second one does not work as expected so far.
Since we are passing an object to the renderApp
function, values' types in this object are self-evident. It might not necessary to cast a numeric string to a number.
The behaviour of chakra-ui radio can be found in this issue: https://github.com/chakra-ui/chakra-ui/issues/2931#issuecomment-761758604
There is another factor to be consider. When user change property in form, do we have to convert the value of input to number or boolean?
When evaling number string, we automatically convert it to real number. But sometimes, we need it to be number string. For example, in chakra radio, chakra will change number to string number. Is it nessesary to keep this logic?