Skip to content

Commit 3e63f47

Browse files
JockeCKdotpointer
authored andcommitted
fix for bug with list column norefs
1 parent 368c660 commit 3e63f47

File tree

1 file changed

+20
-10
lines changed

1 file changed

+20
-10
lines changed

cosmoz-omnitable-column-mixin.js

+20-10
Original file line numberDiff line numberDiff line change
@@ -268,19 +268,29 @@ export const columnMixin = dedupingMixin(base => class extends templatizeMixin(b
268268
return;
269269
}
270270
const used = [];
271-
return values.filter((item, index, array) => {
272-
if (array.indexOf(item) !== index) {
273-
return false;
271+
return values.reduce((acc, cur) => {
272+
if (Array.isArray(cur)) {
273+
cur.forEach(subcur => {
274+
acc.push(subcur);
275+
});
276+
return acc;
274277
}
275-
if (valueProperty) {
276-
const value = this.get(valueProperty, item);
277-
if (used.indexOf(value) !== -1) {
278+
acc.push(cur);
279+
return acc;
280+
}, [])
281+
.filter((item, index, array) => {
282+
if (array.indexOf(item) !== index) {
278283
return false;
279284
}
280-
used.push(value);
281-
}
282-
return true;
283-
});
285+
if (valueProperty) {
286+
const value = this.get(valueProperty, item);
287+
if (used.indexOf(value) !== -1) {
288+
return false;
289+
}
290+
used.push(value);
291+
}
292+
return true;
293+
});
284294
}
285295
_pathsChanged(valuePath, groupOn, sortOn) {
286296
if (valuePath == null) {

0 commit comments

Comments
 (0)