jQWidgets Forums
jQuery UI Widgets › Forums › Lists › DropDownList › Filter and dropdownlist : Is it a bug ?
Tagged: dropdownlist control, dropdownlist filtering, dropdownlist widget, jquery listbox filtering, listbox control, listbox filtering
This topic contains 8 replies, has 2 voices, and was last updated by nico86 10 years, 5 months ago.
-
Author
-
Hi,
I have tried the new filter featureMy list consists of a sequence of numbers,
I enter the value 163 in the filter, a sequence appeared, I clicked on one of them but two values were selected
when I delete the filter we can see that both values are clicked when I clicked once.
Is it a bug or i don’t unterstand comething ?
Thanks
We will investigate whether there is something wrong on our side. Thanks for writing.
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.com/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.
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 StoevjQWidgets Team
http://www.jqwidgets.com/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 } });
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 StoevjQWidgets Team
http://www.jqwidgets.com/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
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 StoevjQWidgets Team
http://www.jqwidgets.com/It’s resolved with the 3.6.
Thanks. -
AuthorPosts
You must be logged in to reply to this topic.