Skip to content

Commit 91cc282

Browse files
committed
Fixes #67
1 parent ebf6a6e commit 91cc282

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

cosmoz-omnitable-column-autocomplete.html

+7-1
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,12 @@
9292
},
9393

9494
_applyMultiFilter(filter, item) {
95+
// check if the item does not have a value for the filtered property
96+
let value = this.get(this.valuePath, item);
97+
if (value === undefined || value === null) {
98+
return false;
99+
}
100+
95101
const filterArray = filter.map(element => {
96102
let val = element;
97103
if (this.valueProperty) {
@@ -100,7 +106,7 @@
100106
return val.toString().toLowerCase();
101107
});
102108

103-
let value = this.get(this.valuePath, item);
109+
104110
if (this.valueProperty) {
105111
value = value[this.valueProperty];
106112
}

demo/full-demo.html

+2
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,8 @@ <h3>Cosmoz omnitable demo</h3>
184184
data[1].value = undefined;
185185
data[2].amount = null;
186186
data[3].value = null;
187+
// test filtering/sorting when item has undefined value in autocomplete column
188+
data[0].group = undefined;
187189
this.async(() => {
188190
this.data = data;
189191
}, 100);

0 commit comments

Comments
 (0)