native-document 1.0.144 → 1.0.145
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -76,6 +76,10 @@ const buildBody = ($desc, instance, visibleColumns) => {
|
|
|
76
76
|
|
|
77
77
|
return fragment;
|
|
78
78
|
},
|
|
79
|
+
set: (args) => {
|
|
80
|
+
mutations.clear()
|
|
81
|
+
mutations.push(args);
|
|
82
|
+
},
|
|
79
83
|
push: (args) => {
|
|
80
84
|
tbody.append(mutations.toFragment(args));
|
|
81
85
|
},
|
|
@@ -154,7 +158,9 @@ const buildRow = ($desc, visibleColumns, row) => {
|
|
|
154
158
|
|
|
155
159
|
const extraProps = column.$description.props || $desc.cellProps?.(value, row, column) || {};
|
|
156
160
|
const classProperty = classPropertyAccumulator(extraProps.class || {});
|
|
157
|
-
|
|
161
|
+
if(column.$description.align) {
|
|
162
|
+
classProperty.add(`is-${column.$description.align}`)
|
|
163
|
+
}
|
|
158
164
|
const cell = TBodyCell({ ...extraProps, class: classProperty.value() },
|
|
159
165
|
content
|
|
160
166
|
);
|
|
@@ -166,7 +172,7 @@ const buildRow = ($desc, visibleColumns, row) => {
|
|
|
166
172
|
|
|
167
173
|
const rowExtraProps = $desc.rowProps?.(row) || {};
|
|
168
174
|
const classProperty = classPropertyAccumulator(rowExtraProps.class || {});
|
|
169
|
-
classProperty.add('has-click'
|
|
175
|
+
classProperty.add({'has-click': !!$desc.onRowClick})
|
|
170
176
|
|
|
171
177
|
const tr = TRow({ ...rowExtraProps, class: classProperty.value()}, cells);
|
|
172
178
|
|