Skip to content

Commit 804139f

Browse files
JockeCKPatrik Kullman
authored and
Patrik Kullman
committed
saving csv created faulty content with horizontal list columns (#279)
* saving csv created faulty content with horizontal list columns * Added fix for save as xlsx * Fixed order of mixins, refactored so column list mixin does work and nullcheckfilter added
1 parent 2e67cf5 commit 804139f

2 files changed

+4
-8
lines changed

cosmoz-omnitable-column-list-horizontal.html

+3-8
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656
* @appliesMixin Cosmoz.OmnitableColumnMixin
5757
* @appliesMixin Cosmoz.ListColumnMixin
5858
*/
59-
class OmnitableColumnListHorizontal extends Cosmoz.OmnitableColumnMixin(Cosmoz.ListColumnMixin(
59+
class OmnitableColumnListHorizontal extends Cosmoz.ListColumnMixin(Cosmoz.OmnitableColumnMixin(
6060
Polymer.mixinBehaviors([Cosmoz.TranslatableBehavior], Polymer.Element)
6161
)) {
6262
static get is() {
@@ -145,13 +145,8 @@
145145
return [];
146146
}
147147

148-
getString() {
149-
const value = super.getString.apply(this, arguments);
150-
if (!Array.isArray(value) || value.length === 0) {
151-
return '';
152-
}
153-
154-
return value.join(', ');
148+
toXlsxValue(item, valuePath = this.valuePath) {
149+
return this.getString(item, valuePath);
155150
}
156151
}
157152

cosmoz-omnitable-column-list-mixin.html

+1
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
return values
3434
.map(value => this.textProperty ? this.get(this.textProperty, value) : value)
3535
.filter((value, index, array) => array.indexOf(value) === index)
36+
.filter(Boolean)
3637
.join(', ');
3738
}
3839
});

0 commit comments

Comments
 (0)