@bit-sun/business-component 2.1.14 → 2.1.15
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/dist/index.esm.js
CHANGED
|
@@ -14234,7 +14234,7 @@ var SortableTable = /*#__PURE__*/function (_React$Component) {
|
|
|
14234
14234
|
var columnConfig = _this.getConfigFromlocalstorage();
|
|
14235
14235
|
|
|
14236
14236
|
var initialDataSourceData = columnConfig.length ? datasource.map(function (item) {
|
|
14237
|
-
var _showColumnItem$, _inner
|
|
14237
|
+
var _inner$, _showColumnItem$, _inner$2;
|
|
14238
14238
|
|
|
14239
14239
|
var inner = columnConfig.filter(function (innerItem) {
|
|
14240
14240
|
return innerItem.dataIndex && innerItem.dataIndex === item.dataIndex || innerItem.key && innerItem.key === item.key;
|
|
@@ -14243,8 +14243,9 @@ var SortableTable = /*#__PURE__*/function (_React$Component) {
|
|
|
14243
14243
|
return inneritem.dataIndex && inneritem.dataIndex === item.dataIndex || inneritem.key && inneritem.key === item.key;
|
|
14244
14244
|
});
|
|
14245
14245
|
return _objectSpread2(_objectSpread2({}, item), {}, {
|
|
14246
|
+
fixed: inner.length ? (_inner$ = inner[0]) === null || _inner$ === void 0 ? void 0 : _inner$.fixed : item === null || item === void 0 ? void 0 : item.fixed,
|
|
14246
14247
|
key: item.key || item.dataIndex,
|
|
14247
|
-
width: ((_showColumnItem$ = showColumnItem[0]) === null || _showColumnItem$ === void 0 ? void 0 : _showColumnItem$.width) || ((_inner$ = inner[0]) === null || _inner$ === void 0 ? void 0 : _inner
|
|
14248
|
+
width: ((_showColumnItem$ = showColumnItem[0]) === null || _showColumnItem$ === void 0 ? void 0 : _showColumnItem$.width) || ((_inner$2 = inner[0]) === null || _inner$2 === void 0 ? void 0 : _inner$2.width) || item.width,
|
|
14248
14249
|
hidden: columnConfig.length && !inner.length
|
|
14249
14250
|
});
|
|
14250
14251
|
}) : _toConsumableArray(datasource);
|
package/dist/index.js
CHANGED
|
@@ -14248,7 +14248,7 @@ var SortableTable = /*#__PURE__*/function (_React$Component) {
|
|
|
14248
14248
|
var columnConfig = _this.getConfigFromlocalstorage();
|
|
14249
14249
|
|
|
14250
14250
|
var initialDataSourceData = columnConfig.length ? datasource.map(function (item) {
|
|
14251
|
-
var _showColumnItem$, _inner
|
|
14251
|
+
var _inner$, _showColumnItem$, _inner$2;
|
|
14252
14252
|
|
|
14253
14253
|
var inner = columnConfig.filter(function (innerItem) {
|
|
14254
14254
|
return innerItem.dataIndex && innerItem.dataIndex === item.dataIndex || innerItem.key && innerItem.key === item.key;
|
|
@@ -14257,8 +14257,9 @@ var SortableTable = /*#__PURE__*/function (_React$Component) {
|
|
|
14257
14257
|
return inneritem.dataIndex && inneritem.dataIndex === item.dataIndex || inneritem.key && inneritem.key === item.key;
|
|
14258
14258
|
});
|
|
14259
14259
|
return _objectSpread2(_objectSpread2({}, item), {}, {
|
|
14260
|
+
fixed: inner.length ? (_inner$ = inner[0]) === null || _inner$ === void 0 ? void 0 : _inner$.fixed : item === null || item === void 0 ? void 0 : item.fixed,
|
|
14260
14261
|
key: item.key || item.dataIndex,
|
|
14261
|
-
width: ((_showColumnItem$ = showColumnItem[0]) === null || _showColumnItem$ === void 0 ? void 0 : _showColumnItem$.width) || ((_inner$ = inner[0]) === null || _inner$ === void 0 ? void 0 : _inner
|
|
14262
|
+
width: ((_showColumnItem$ = showColumnItem[0]) === null || _showColumnItem$ === void 0 ? void 0 : _showColumnItem$.width) || ((_inner$2 = inner[0]) === null || _inner$2 === void 0 ? void 0 : _inner$2.width) || item.width,
|
|
14262
14263
|
hidden: columnConfig.length && !inner.length
|
|
14263
14264
|
});
|
|
14264
14265
|
}) : _toConsumableArray(datasource);
|
package/package.json
CHANGED
|
@@ -119,6 +119,7 @@ class SortableTable extends React.Component<SortTableProps> {
|
|
|
119
119
|
let showColumnItem = showColumns.filter((inneritem:any) => ((inneritem.dataIndex && inneritem.dataIndex === item.dataIndex) || (inneritem.key && inneritem.key === item.key)))
|
|
120
120
|
return {
|
|
121
121
|
...item,
|
|
122
|
+
fixed: inner.length ? inner[0]?.fixed : item?.fixed,
|
|
122
123
|
key: item.key || item.dataIndex,
|
|
123
124
|
width: showColumnItem[0]?.width || inner[0]?.width || item.width,
|
|
124
125
|
hidden: columnConfig.length && !inner.length,
|