Radio button value type changes

https://snippet.webix.com/hfntqpyt

Since id is used as the value for radio buttons, I find it very strange that when in the onChange or with form.getValues() the type of the value is changed to string.

If I enter my initial value as number, I would except the resulting value to still be a number. Now it seems they are getting cast to string.

Hello @Chrisiaan ,

It is the expected behavior. The fact is that getValue() method of ui.radio returns the result string. As a solution, I can suggest you apply the customization directly for the radio:

webix.protoUI({
  name: "customradio",
  $cssName: "radio",
  $prepareValue:function(value){
    if (!isNaN(value)){
      return Number(value)}		
    return value === 0 ? "0" : (value || "");
  }
}, webix.ui.radio)

Please take a look at the snippet:
https://snippet.webix.com/o9w73kjt