Opened 8 years ago
Closed 8 years ago
#14644 closed defect (fixed)
[patch] [cla] bug in dijit/form/_AutoCompleterMixin
Reported by: | Martin Repta | Owned by: | Douglas Hays |
---|---|---|---|
Priority: | high | Milestone: | 1.8 |
Component: | Dijit - Form | Version: | 1.7.1 |
Keywords: | filteringSelect, dijit, _AutoCompleterMixin | Cc: | martinerko@… |
Blocked By: | Blocking: |
Description
We found that dijit.form.FilteringSelect? is not working correctly and probably all other widgets that inherits from dijit/form/_AutoCompleterMixin.
In out sample, we have filteringSelect with store which contains data with item where id == 0. When you try to select item with id == 0, the value of filteringSelect will be empty string.
Problem is inside condition, where _AutoCompleterMixin checks if value is not null. But this condision returns true also when value is 0.
I have attached sample to demostrate problem and also patch file.
Attachments (2)
Change History (6)
Changed 8 years ago by
Changed 8 years ago by
Attachment: | sample.html added |
---|
comment:1 Changed 8 years ago by
comment:2 Changed 8 years ago by
I think it is a bug, because it can accept integer values, but not 0, because condition if(!value) is not enough!
comment:3 Changed 8 years ago by
Milestone: | tbd → 1.8 |
---|---|
Status: | new → assigned |
technically this is not a bug since values are supposed to be strings
if you change your ids to be strings then
"0"
will be handled properly.i'll leave this open for doug or bill to decide what to do with it but i've seen a number of issues closed because values are integers rather than strings. i think its quite common that people don't realize that values have to be strings and personally, i'd like to see integers be valid values, but for now they're not.