Search is not working for strings produced from numbers like "4730"
My OS is - Ubuntu 15.04 LTS and my browser is - Mozilla Firefox 44.0.
I have a select tag like this -
<div class="col-sm-10">
<select class="form-control selectpicker show-tick" title="Select post-code..." id="post-code" data-live-search-placeholder="Search desired post-codes here" data-live-search="true">
</select>
</div>
Which is populating from a JSON with these options -
<option data-tokens="4730" value="0">4730</option>
<option data-tokens="4731" value="1">4731</option>
<option data-tokens="4732" value="0">4732</option>
And the search option is not working for such values like 4730, 4731 and 4732. All of these values are populating as string.
For live test, you can check here - http://ni8mr.github.io/gpsl-ui/. You have to follow the selection hierarchy. First country, than division, district, sub-district and than post-codes will be available.
bootstrap-select is not checking for and casting data-tokens that contain all digits to a string, so it throws .toUpperCase is not a function
Ok. I have solved it by adding an extra string with the value of data-tokens attribute. Thanks @shotolab for help. I am closing this issue now. But the developers of this plug-in may want to look into this issue. Something should be done for dealing with such cases.