jQWidgets Forums

jQuery UI Widgets Forums Lists ComboBox jqxComboBox type versus select

This topic contains 6 replies, has 4 voices, and was last updated by  Peter Stoev 10 years, 3 months ago.

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
  • jqxComboBox type versus select #65112

    wnema
    Participant

    There is a bug in jqxComboBox behavior where if you typed the value of an existing option from the drop down the selectedItem does not change accordingly. Also, the fact that you can type your value should have better API support. Now, I had to handle it via code (to tell if user typed or selected) which should not be necessary. I thought $(‘#cboCat’).on(‘select, change’, approach would do it but id didn’t.

    jqxComboBox type versus select #65129

    Peter Stoev
    Keymaster

    Hi wnema,

    Unfortunately, we don’t think that there’s a bug in that. When you type a value, the selection is changed and the events are raised correctly. The behavior is by design and it should work in that way. Example: http://www.jqwidgets.com/jquery-widgets-demo/demos/jqxcombobox/events.htm?arctic

    Best Regards,
    Peter Stoev

    jqxComboBox type versus select #65156

    wnema
    Participant

    Hi Peter,
    Whether by design or a bug is debatable, I think. However, regarding the API issue I believe there should be support for $(“#jqxComboBox”).jqxComboBox(‘text’) or $(“#jqxComboBox”).jqxComboBox(‘label’) because when typing in a value $(“#jqxComboBox”).jqxComboBox(‘getSelectedItem’) isn’t defined and thus we cannot do $(“#jqxComboBox”).jqxComboBox(‘getSelectedItem’).label. $(“#jqxComboBox”).val() correctly gives you what you typed but when selecting from a drop down gives the “value” equivalent of <option value=”1″>one</option>. In other words, how can you in one call always get the text of either what you typed or selected from a list?

    jqxComboBox type versus select #65176

    Peter Stoev
    Keymaster

    Hi wnema,

    Each combobox item has “label” and “value”. “getSelectedItem” returns an Item which have Label and Value in jQWidgets 3.6.0 – the current version. Online Demo: http://jsfiddle.net/76mpd81c/

    Best Regards,
    Peter Stoev

    jqxComboBox type versus select #65535

    kingdomp
    Participant

    Hi,

    I was agree with wnema, that will be appreciate to have a direct access to the input control by a function like getinputvalue. Normally a comboBox was a input text with a list of choice for it, now is look more a DropDownList with a search. Just adding a function will be more them welcome.

    This was my work arround :

    Controle name :
    $(“#textcombo”).jqxComboBox

    Input access :
    var input_combo =$(“#textcombo input”);
    //console.log(input_combo);
    var txt_combo =input_combo[0].value;

    Regards

    jqxComboBox type versus select #67904

    morgenweck
    Participant

    I also agree with wnema. I need to get what the person types if it is not a selected item.

    jqxComboBox type versus select #67949

    Peter Stoev
    Keymaster

    There is val() method which you can use for getting the widget’s value or what’s typed in if there’s no value. – http://jsfiddle.net/jqwidgets/Laykzxvj/. The getSelectedItem should return the selected item and we don’t agree that is shouldn’t return it!

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com/

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

You must be logged in to reply to this topic.