jQuery UI Widgets Forums Lists ComboBox checkAll Is showing one item less

This topic contains 1 reply, has 2 voices, and was last updated by  Peter Stoev 10 years, 10 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • checkAll Is showing one item less #51695

    santu.555@gmail.com
    Participant

    Hello,

    I am trying to use the renderSelectedItem with the checkAll and it is giving one number less in the renderSelectedItem. The example is below.

    var source = [
    “Affogato”,
    “Americano”,
    “Bicerin”];

    // Create a jqxComboBox
    $(“#jqxComboBox”).jqxComboBox({
    source: source,
    theme: ‘energyblue’,
    width: ‘200px’,
    height: ’25px’,
    checkboxes: true,
    renderSelectedItem: function(index, item) {
    var label = 0;
    var items = $(‘#jqxComboBox’).jqxComboBox(‘getCheckedItems’);
    if (items != null) {
    label = items.length;
    }
    return label + ‘ ‘ + ‘selected’;
    }
    });
    $(“#jqxButton”).jqxButton({
    theme:’energyblue’
    });
    $(“#jqxComboBox”).jqxComboBox(‘checkAll’);

    The example should show the result as 3 selected, but it is showing 2 selected.
    The same is available as test in jsfiddle http://jsfiddle.net/santu555/NsN9B/1/

    Thanks
    Santosh

    checkAll Is showing one item less #51697

    Peter Stoev
    Keymaster

    Hi Santosh,

    After calling “checkAll” the widget displays the correct amount of selected items: http://jsfiddle.net/jqwidgets/arP2Z/.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com

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

You must be logged in to reply to this topic.