Form combobox doesn't report 0

I’m using a form with a combobox.

The combobox has data with one of the values being 0.

When I do getValue() on the form the combobox doesn’t report the value.
Is there a workaround for this? we can’t change the 0 value as it relates to another item.

You can see this here: DHTMLX Snippet Tool

Hello @tonygoodchild,

It’s an issue on our end and the dev team will try to fix it in future versions (even is it’s not suggested to use id: 0 in JavaScript).

As a workaround, you can get the exact value of combo control, with internal properties, like follows:

  console.log( form.getItem('combo').combobox._state.value)

Or by manual converting the getValue result to number, like follows:

   console.log(+form.getItem('combo').getValue())

Here is a demo:
https://snippet.dhtmlx.com/5jtxpore

Kind regards,