jQWidgets Forums

jQuery UI Widgets Forums Lists DropDownList Filter and dropdownlist : Is it a bug ?

This topic contains 8 replies, has 2 voices, and was last updated by  nico86 10 years, 5 months ago.

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
  • Filter and dropdownlist : Is it a bug ? #60378

    nico86
    Participant

    Hi,
    I have tried the new filter feature

    My list consists of a sequence of numbers,
    stocker des photos

    I enter the value 163 in the filter, a sequence appeared, I clicked on one of them but two values ​​were selected
    stocker des photos

    when I delete the filter we can see that both values ​​are clicked when I clicked once.
    stocker des photos

    Is it a bug or i don’t unterstand comething ?

    Thanks

    Filter and dropdownlist : Is it a bug ? #60399

    Peter Stoev
    Keymaster

    We will investigate whether there is something wrong on our side. Thanks for writing.

    Best Regards,
    Peter Stoev

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

    Filter and dropdownlist : Is it a bug ? #60411

    nico86
    Participant

    It is ListXox widget, not dropdownlist…sorry for my mistake…if you could move this thread.

    ok for the answer, this feature is really important for me.

    Filter and dropdownlist : Is it a bug ? #60418

    Peter Stoev
    Keymaster

    Sorry, we cannot reproduce the posted behavior.

    Example:

    <!DOCTYPE html>
    <html lang="en">
    <head>
        <title id='Description'>jqxListBox Filtering</title>
        <link rel="stylesheet" href="../../jqwidgets/styles/jqx.base.css" type="text/css" />
        <script type="text/javascript" src="../../scripts/jquery-1.11.1.min.js"></script>
        <script type="text/javascript" src="../../jqwidgets/jqxcore.js"></script>
        <script type="text/javascript" src="../../jqwidgets/jqxbuttons.js"></script>
        <script type="text/javascript" src="../../jqwidgets/jqxscrollbar.js"></script>
        <script type="text/javascript" src="../../jqwidgets/jqxlistbox.js"></script>
        <script type="text/javascript" src="../../jqwidgets/jqxdata.js"></script>
        <script type="text/javascript" src="../../scripts/demos.js"></script>
        <script type="text/javascript">
            $(document).ready(function () {           
                var shirtFileNames = ["2-sided-dodgers-bankrupt-t-shirt-ash", "black-retro-rock-band-guitar-controller",
                    "bright-green-gettin-lucky-in-kentucky", "brown-loading-bar-computer-geek", "cool-story-bro",
                    "fear-the-beard", "honey-badger-don-t-care", "misfits-sf-giants-white", "scott-pilgrim-red-rock-band"];
                var shirts = ["2 sided dodgers<br>bankrupt<br>t shirt ash", "black retro<br>rock band<br>guitar controller",
                    "bright green<br>gettin lucky<br>in kentucky", "brown loading<br>bar computer geek", "cool story bro",
                    "fear the beard", "honey badger<br>don t care", "misfits sf<br>giants white", "scott pilgrim<br>red rock<br>band"];
    
                // Create jqxListBox
                $('#listbox').jqxListBox({
                    checkboxes: true,
                    filterable: true, selectedIndex: 0, source: shirts, itemHeight: 90, height: 300, width: 250,
                    renderer: function (index, label, value) {
                        var datarecord = shirtFileNames[index];
                        var imgurl = '../../images/t-shirts/' + datarecord.toLowerCase() + '.png';
                        var img = '<img height="70" width="70" src="' + imgurl + '"/>';
                        var table = '<table style="min-width: 130px;"><tr><td style="width: 80px;">' + img + '</td><td>' + label + '</td></tr></table>';
                        return table;
                    }
                });
            });
        </script>
    </head>
    <body class='default'>
        <div id="listbox">
        </div>
    </body>
    </html>
    

    Please, provide a sample in jsfiddle.net which illustrates the experienced behavior.

    Best Regards,
    Peter Stoev

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

    Filter and dropdownlist : Is it a bug ? #60425

    nico86
    Participant

    i made a little sample with jsfiddle.net and it’s true, all is ok…..very strange because doesn’t work into my web application, Do you think that the problem came of the datasource (over 1000 lines), dataadaptateur (dataType : ‘json’) ? could you try with external json source ?

    Here my js code :

       $.ajax({
    	type : 'POST', // envoi des données en GET ou POST
    	beforeSend : function() {},
    	url : 'http:'+server_sp+'/Coding/Metaddra_test/LLT_LIST',	// url du fichier de traitement	
    	async:false,	
    	data : '',
    	dataType : 'json',
    	success  : function(data){
    				},
    	complete :function(data){
    		var resu= eval(data);  
    		
                    var source =
                    {
                        datatype: "json",
                        datafields: [
                            { 
    						  name: 'LLT'
    						  }
                        ],
    
    					localdata: resu
                    };
    				
                    var dataAdapter = new $.jqx.dataAdapter(source);
                    $("#jqxWidget").jqxListBox({ source: dataAdapter, displayMember: "LLT", width: 300, height: 350, checkboxes: true , filterable: true, searchMode: 'contains', theme: 'metro'});
                    $("#jqxWidget").on('checkChange', function (event) {
                        var args = event.args;
                        if (args.checked) {
                            $("#Events").text("Checked: " + args.label);
                        }
                        else {
                            $("#Events").text("Unchecked: " + args.label);
                        }
                        var items = $("#jqxWidget").jqxListBox('getCheckedItems');
                        var checkedItems = "";
                        $.each(items, function (index) {
                            if (index < items.length - 1) {
                                checkedItems += this.label + ", ";
                            }
                            else checkedItems += this.label;
                        });
                        $("#CheckedItems").text(checkedItems);
    				});
    				$('#ajax-loader1').remove(); // on enleve le loader
    	}										
    		});
    Filter and dropdownlist : Is it a bug ? #60436

    Peter Stoev
    Keymaster

    Hi nico86,

    The data source does not matter. When you bind a widget through jqxDataAdapter, the output is always the same – records Array stored in the dataAdapter.

    Best Regards,
    Peter Stoev

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

    Filter and dropdownlist : Is it a bug ? #60439

    nico86
    Participant

    I made an example to reproduce the bug : if you use the filter and click one of them, two boxes are checked

    http://jsfiddle.net/72bcw8tj/6/

    Thanks

    Filter and dropdownlist : Is it a bug ? #60448

    Peter Stoev
    Keymaster

    Hi nico86,

    Thanks for the feedback. We confirm the misbehavior and will do our best to resolve it for our next release.

    Best Regards,
    Peter Stoev

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

    Filter and dropdownlist : Is it a bug ? #63519

    nico86
    Participant

    It’s resolved with the 3.6.
    Thanks.

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

You must be logged in to reply to this topic.