[FIX] web: possibility to autocomplete 'No' for boolean fields
In the search bar. Besides, if the label value of the selection field is set to False, which is quite dummy but accepted The autocomplete crashed.
This commit is contained in:
parent
4c2706d685
commit
a804d9a70f
|
@ -1453,7 +1453,7 @@ instance.web.search.SelectionField = instance.web.search.Field.extend(/** @lends
|
|||
var results = _(this.attrs.selection).chain()
|
||||
.filter(function (sel) {
|
||||
var value = sel[0], label = sel[1];
|
||||
if (!value) { return false; }
|
||||
if (value === undefined || !label) { return false; }
|
||||
return label.toLowerCase().indexOf(needle.toLowerCase()) !== -1;
|
||||
})
|
||||
.map(function (sel) {
|
||||
|
|
Loading…
Reference in New Issue