cloud-b2b 1.1.65 → 1.1.66
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/es/SuperTable2/SuperTable2.js +27 -11
- package/lib/SuperTable2/SuperTable2.js +27 -11
- package/package.json +1 -1
|
@@ -839,23 +839,39 @@ var SuperTable2 = /*#__PURE__*/function (_React$Component) {
|
|
|
839
839
|
_this$props4$expanded = _this$props4.expandedRowRender,
|
|
840
840
|
expandedRowRender = _this$props4$expanded === void 0 ? undefined : _this$props4$expanded,
|
|
841
841
|
_this$props4$onExpand = _this$props4.onExpand,
|
|
842
|
-
onExpand = _this$props4$onExpand === void 0 ? undefined : _this$props4$onExpand
|
|
842
|
+
onExpand = _this$props4$onExpand === void 0 ? undefined : _this$props4$onExpand,
|
|
843
|
+
_this$props4$expanded2 = _this$props4.expandedRowRenderKeepScroll,
|
|
844
|
+
expandedRowRenderKeepScroll = _this$props4$expanded2 === void 0 ? false : _this$props4$expanded2;
|
|
843
845
|
var widthX = _reduceInstanceProperty(_context16 = _filterInstanceProperty(cols).call(cols, function (col) {
|
|
844
846
|
return !col.hide;
|
|
845
847
|
})).call(_context16, function (width, item) {
|
|
846
848
|
var _context17;
|
|
847
849
|
return width += item.width ? item.width : _includesInstanceProperty(_context17 = ['index', 'checked']).call(_context17, item.key) ? 70 : item.type === 'img' ? 200 : 120;
|
|
848
850
|
}, 0);
|
|
849
|
-
var scrollProps =
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
851
|
+
var scrollProps = {};
|
|
852
|
+
if (expandedRowRenderKeepScroll) {
|
|
853
|
+
//拥有expandedRowRender时候保持scroll属性
|
|
854
|
+
scrollProps = {
|
|
855
|
+
expandedRowRender: expandedRowRender,
|
|
856
|
+
scroll: {
|
|
857
|
+
x: _someInstanceProperty(cols).call(cols, function (item) {
|
|
858
|
+
return !helper.isEmpty2(item.fixed);
|
|
859
|
+
}) ? widthX : true,
|
|
860
|
+
y: maxHeight
|
|
861
|
+
}
|
|
862
|
+
};
|
|
863
|
+
} else {
|
|
864
|
+
scrollProps = !helper.isEmpty2(expandedRowRender) ? {
|
|
865
|
+
expandedRowRender: expandedRowRender
|
|
866
|
+
} : {
|
|
867
|
+
scroll: {
|
|
868
|
+
x: _someInstanceProperty(cols).call(cols, function (item) {
|
|
869
|
+
return !helper.isEmpty2(item.fixed);
|
|
870
|
+
}) ? widthX : true,
|
|
871
|
+
y: maxHeight
|
|
872
|
+
}
|
|
873
|
+
};
|
|
874
|
+
}
|
|
859
875
|
var _this$getPropsByCheck = _this.getPropsByCheckbox2(items),
|
|
860
876
|
onRowClick = _this$getPropsByCheck.onRowClick,
|
|
861
877
|
extraProps = _objectWithoutProperties(_this$getPropsByCheck, _excluded);
|
|
@@ -852,23 +852,39 @@ var SuperTable2 = /*#__PURE__*/function (_React$Component) {
|
|
|
852
852
|
_this$props4$expanded = _this$props4.expandedRowRender,
|
|
853
853
|
expandedRowRender = _this$props4$expanded === void 0 ? undefined : _this$props4$expanded,
|
|
854
854
|
_this$props4$onExpand = _this$props4.onExpand,
|
|
855
|
-
onExpand = _this$props4$onExpand === void 0 ? undefined : _this$props4$onExpand
|
|
855
|
+
onExpand = _this$props4$onExpand === void 0 ? undefined : _this$props4$onExpand,
|
|
856
|
+
_this$props4$expanded2 = _this$props4.expandedRowRenderKeepScroll,
|
|
857
|
+
expandedRowRenderKeepScroll = _this$props4$expanded2 === void 0 ? false : _this$props4$expanded2;
|
|
856
858
|
var widthX = (0, _reduce["default"])(_context16 = (0, _filter["default"])(cols).call(cols, function (col) {
|
|
857
859
|
return !col.hide;
|
|
858
860
|
})).call(_context16, function (width, item) {
|
|
859
861
|
var _context17;
|
|
860
862
|
return width += item.width ? item.width : (0, _includes["default"])(_context17 = ['index', 'checked']).call(_context17, item.key) ? 70 : item.type === 'img' ? 200 : 120;
|
|
861
863
|
}, 0);
|
|
862
|
-
var scrollProps =
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
864
|
+
var scrollProps = {};
|
|
865
|
+
if (expandedRowRenderKeepScroll) {
|
|
866
|
+
//拥有expandedRowRender时候保持scroll属性
|
|
867
|
+
scrollProps = {
|
|
868
|
+
expandedRowRender: expandedRowRender,
|
|
869
|
+
scroll: {
|
|
870
|
+
x: (0, _some["default"])(cols).call(cols, function (item) {
|
|
871
|
+
return !_helper["default"].isEmpty2(item.fixed);
|
|
872
|
+
}) ? widthX : true,
|
|
873
|
+
y: maxHeight
|
|
874
|
+
}
|
|
875
|
+
};
|
|
876
|
+
} else {
|
|
877
|
+
scrollProps = !_helper["default"].isEmpty2(expandedRowRender) ? {
|
|
878
|
+
expandedRowRender: expandedRowRender
|
|
879
|
+
} : {
|
|
880
|
+
scroll: {
|
|
881
|
+
x: (0, _some["default"])(cols).call(cols, function (item) {
|
|
882
|
+
return !_helper["default"].isEmpty2(item.fixed);
|
|
883
|
+
}) ? widthX : true,
|
|
884
|
+
y: maxHeight
|
|
885
|
+
}
|
|
886
|
+
};
|
|
887
|
+
}
|
|
872
888
|
var _this$getPropsByCheck = _this.getPropsByCheckbox2(items),
|
|
873
889
|
onRowClick = _this$getPropsByCheck.onRowClick,
|
|
874
890
|
extraProps = (0, _objectWithoutProperties2["default"])(_this$getPropsByCheck, _excluded);
|