jQuery UI Widgets Forums Lists ComboBox JQXCombobox Issue

This topic contains 4 replies, has 2 voices, and was last updated by  Hristo 4 years, 5 months ago.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
  • JQXCombobox Issue #112533

    geromelouie
    Participant

    Hi,

    I have a combo box column within a grid and one of it’s values is 0. When I load data into the grid, the combo box option with a 0 value is not pre-selected when one of the rows has that value.

    I am using angular 7.

    Hope you can provide assistance on this.

    Thanks!

    JQXCombobox Issue #112538

    geromelouie
    Participant

    I just want to add that it only happens when I add a blank option in the combobox with a null value.

    Thanks!

    JQXCombobox Issue #112542

    Hristo
    Participant

    Hello geromelouie,

    Could you provide us with one simple example that demonstrates your case?
    I tested this example and it seems to work fine:
    https://stackblitz.com/edit/github-wj74q8-nu5tb6
    I look forward to hearing from you.

    Best Regards,
    Hristo Hristov

    jQWidgets team
    https://www.jqwidgets.com

    JQXCombobox Issue #112569

    geromelouie
    Participant

    Hi Hristo,

    My case scenario is I have a combo box column inside a grid. Then the combo box has the following values: (value: null, label: ”}, {value: 0, label: ‘Option 0’}, {value: 1, label: ‘Option 1’}. Now if the column value is equals to 1, Option 1 gets selected as expected. However, when the column has a value 0, the option with the null value gets selected instead of the option with the 0 value. I think this has to do with typescript treating 0 as null. If I remove the null option, the 0 value gets selected as expected.

    Thanks!

    JQXCombobox Issue #112586

    Hristo
    Participant

    Hello geromelouie,

    Could you clarify it?
    What is your final goal?
    If you change the position of the null” value in the end, for example, it will be fine.
    Also, you could use the null” value as a string and internally in your code to compare and set the wanted type correctly.

    Best Regards,
    Hristo Hristov

    jQWidgets team
    https://www.jqwidgets.com

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.