EasyUI Forum

General Category => EasyUI for jQuery => Topic started by: 2plus2 on April 09, 2013, 04:06:28 PM



Title: Combobox Autocomplete Case Sensitive...
Post by: 2plus2 on April 09, 2013, 04:06:28 PM
Howdy...

Is there a way to turn off case sensitivity on the Autocomplete?

As per the Demo ( http://www.jeasyui.com/demo/main/index.php?plugin=ComboBox&theme=default&dir=ltr&pitem= ) If you put in a capital "O" you get Ohio, Oklahoma, and Oregon. But if I put in a lower case "o", then I get nothing in my list.

Thanks.


Title: Re: Combobox Autocomplete Case Sensitive...
Post by: stworthy on April 09, 2013, 06:28:25 PM
Use 'filter' function to define how to filter items.
Code:
	<select class="easyui-combobox" style="width:200px;" data-options="
filter: function(q,row){
return row.text.toLowerCase().indexOf(q.toLowerCase())==0;
}
">
<option value="NC">North Carolina</option>
<option value="ND">North Dakota</option>
<option value="OH" selected>Ohio</option>
<option value="OK">Oklahoma</option>
<option value="OR">Oregon</option>
<option value="PA">Pennsylvania</option>
<option value="RI">Rhode Island</option>
</select>


Title: Re: Combobox Autocomplete Case Sensitive...
Post by: 2plus2 on April 11, 2013, 05:27:59 PM
Danka


Title: Re: Combobox Autocomplete Case Sensitive...
Post by: sky_proj on April 12, 2013, 12:01:30 AM
please check :
http://www.jeasyui.com/forum/index.php?topic=282.0