Closed alexx-grand closed 7 years ago
https://jsfiddle.net/j317d0az/
I found a solution but it is not look good as for me
This is by design. When you select a radio button, it sets the value of the data to the string value of input. So if it let you initialize selection based on an integer data value, then on selecting another radio button then returning to the first one, you will in fact have changed the data from an integer to the corresponding string. By using strict comparison and requiring converters we have more consistent behavior without subtle indirect side effects which can be difficult to understand or debug.
See the discussion here https://github.com/BorisMoore/jsviews/issues/361.
So yes, using converters is the recommendation. That way your data will still be an integer after selection.
Ok. Thank you for explanation.
BTW I added an additional note to the documentation - see "Data-linking radio buttons to integer variables" at the end of this section: http://www.jsviews.com/#jsvradiogrouptag.
Hi! Is it expected behavior? Here is a code snippet https://jsfiddle.net/23sp0wnj/