oneOf type integer (const / title) gives a string

Version: 3.5.1 “@jsonforms/vue-vanilla”: “3.5.1”,
I have this field in my schema:
“kt_land”: { “title”: “KT_Land”, “type”: “integer”,
“oneOf”:[ {“const”: 190, “title”: “Deutschland” },
{“const”: 200, “title”: “Frankreich” } ]
},
but when i select one entry of the drop down list, i get a String of the integer in my json-object:
“kt_land”: “190”,

so i always get an error: “must be integer must match exactly one schema in oneOf”

I am new to the group, so i hope that the describtion of my problem is correct.
so what is the correct way to define an integer enum with a dropdown list of tittles?

Now i tried this in a playground (JSON Forms Playground | Prismatic Docs) and there it works correct. get an integer in the json object.

Is it possible that there is a problem with the vue integration?

Hi @zebra007,

Yes, if you get a string in the data, then this means the renderer dispatched the wrong data. It should use the const of the schema it is handed over, instead it’s likely using the value from the input element it is rendering which seems to stringify them.

Here the actual options should be used, instead we use the value of the DOM element. Feel free to open an issue and contributing a fix if you’d like

Thanks for the answer. In the code i also found a difference to the VuetifyControl.
But i do not know hot to open an issue for that.
How can i do this?

We manage our issues on Github: GitHub - eclipsesource/jsonforms: Customizable JSON Schema-based forms with React, Angular and Vue support out of the box.

thanks for your help, i opened an issue #2450 .
i do not know how a correct solution would look like or how to access the schema.
For me this workaround helped:
target.selectedIndex === 0 ? undefined : ( Number.isNaN(target.value) ? target.value :Number(target.value) )