@teamix/pro 1.5.39 → 1.5.40
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/pro.js +23 -18
- package/dist/pro.min.js +1 -1
- package/es/index.d.ts +1 -1
- package/es/index.js +1 -1
- package/es/table/components/Layout/index.js +1 -1
- package/es/table/components/ToolBar/FilterColumnIcon.js +1 -1
- package/es/table/components/ToolBar/index.js +2 -1
- package/es/table/index.js +15 -14
- package/lib/index.d.ts +1 -1
- package/lib/index.js +1 -1
- package/lib/table/components/Layout/index.js +1 -1
- package/lib/table/components/ToolBar/FilterColumnIcon.js +1 -1
- package/lib/table/components/ToolBar/index.js +2 -1
- package/lib/table/index.js +15 -14
- package/package.json +1 -1
package/dist/pro.js
CHANGED
@@ -82596,6 +82596,9 @@ var MenuSelect = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().forwa
|
|
82596
82596
|
}
|
82597
82597
|
if (value.length === allKey.length) {
|
82598
82598
|
setCheckboxChecked(true);
|
82599
|
+
} else {
|
82600
|
+
//对于异步请求的数据,dataSource变化时需要重新判断
|
82601
|
+
setCheckboxChecked(false);
|
82599
82602
|
}
|
82600
82603
|
}, [value, dataSource]);
|
82601
82604
|
// 获取瀑布流列数
|
@@ -112962,7 +112965,7 @@ if (!((_window = window) != null && _window.TEAMIXPRO_WITHOUT_ICON)) {
|
|
112962
112965
|
|
112963
112966
|
|
112964
112967
|
|
112965
|
-
var version = '1.5.
|
112968
|
+
var version = '1.5.40';
|
112966
112969
|
|
112967
112970
|
// By TeamixTest
|
112968
112971
|
window.postMessage({
|
@@ -118487,7 +118490,7 @@ var Layout = function Layout(props) {
|
|
118487
118490
|
// todo: 有问题
|
118488
118491
|
mainAction,
|
118489
118492
|
// todo: 有问题
|
118490
|
-
dataFilterFormRef, afterDataFilter, rowSelection]);
|
118493
|
+
dataFilterFormRef, afterDataFilter, rowSelection, actionRef]);
|
118491
118494
|
|
118492
118495
|
// 区域组合渲染
|
118493
118496
|
var renderLayout = function renderLayout() {
|
@@ -119285,7 +119288,7 @@ var FilterColumnIcon = function FilterColumnIcon(props) {
|
|
119285
119288
|
});
|
119286
119289
|
(0,react__WEBPACK_IMPORTED_MODULE_3__.useEffect)(function () {
|
119287
119290
|
var _actionRef$current2;
|
119288
|
-
setNewColumns(processColumns(
|
119291
|
+
setNewColumns(processColumns(newColumns, (_actionRef$current2 = actionRef.current) == null ? void 0 : _actionRef$current2.filterColumns));
|
119289
119292
|
}, [columns, (_actionRef$current3 = actionRef.current) == null ? void 0 : _actionRef$current3.filterColumns]);
|
119290
119293
|
|
119291
119294
|
// 全选
|
@@ -119985,6 +119988,7 @@ var ToolBar = function ToolBar(props) {
|
|
119985
119988
|
var toolBar = props.toolBar,
|
119986
119989
|
fullScreenState = props.fullScreenState,
|
119987
119990
|
switchCardView = props.switchCardView,
|
119991
|
+
actionRef = props.actionRef,
|
119988
119992
|
_props$toolBarAutoWid = props.toolBarAutoWidth,
|
119989
119993
|
toolBarAutoWidth = _props$toolBarAutoWid === void 0 ? true : _props$toolBarAutoWid;
|
119990
119994
|
var toolBarRef = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)(null);
|
@@ -120060,7 +120064,7 @@ var ToolBar = function ToolBar(props) {
|
|
120060
120064
|
}
|
120061
120065
|
}
|
120062
120066
|
return result;
|
120063
|
-
}, [toolBar]);
|
120067
|
+
}, [toolBar, actionRef.current]);
|
120064
120068
|
var renderFlatShape = (0,react__WEBPACK_IMPORTED_MODULE_1__.useMemo)(function () {
|
120065
120069
|
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement("div", {
|
120066
120070
|
className: cls('content')
|
@@ -120689,7 +120693,7 @@ var ProTable = function ProTable(props) {
|
|
120689
120693
|
});
|
120690
120694
|
|
120691
120695
|
// 绑定 Actions
|
120692
|
-
|
120696
|
+
(0,_utils__WEBPACK_IMPORTED_MODULE_7__/* .useActionType */ .tx)(actionRef, {
|
120693
120697
|
fullScreen: function fullScreen() {
|
120694
120698
|
var _actionRef$current2;
|
120695
120699
|
var state = !fullscreenState;
|
@@ -120732,7 +120736,8 @@ var ProTable = function ProTable(props) {
|
|
120732
120736
|
_request(_extends({}, params, (_extends2 = {}, _extends2[targetPageKey] = 1, _extends2)), undefined, undefined, true);
|
120733
120737
|
setShowSkeleton(true);
|
120734
120738
|
} else {
|
120735
|
-
|
120739
|
+
var _extends3;
|
120740
|
+
_request(_extends({}, params, (_extends3 = {}, _extends3[targetPageKey] = currentPage, _extends3[targetPageSizeKey] = pageSize, _extends3)));
|
120736
120741
|
}
|
120737
120742
|
},
|
120738
120743
|
request: function request(params) {
|
@@ -120969,7 +120974,7 @@ var ProTable = function ProTable(props) {
|
|
120969
120974
|
|
120970
120975
|
// 请求函数
|
120971
120976
|
var _request = (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(function (params, noLoading, filterParams, isReset) {
|
120972
|
-
var _dataFilterFormRef$cu2, _actionRef$current$ge, _actionRef$current6,
|
120977
|
+
var _dataFilterFormRef$cu2, _actionRef$current$ge, _actionRef$current6, _extends4;
|
120973
120978
|
// 首次渲染表格,获取 urlState 上的 表头 filter 数据
|
120974
120979
|
if (bindUrl && (bindUrlProps == null ? void 0 : bindUrlProps.headerFilters) !== false && dataRef.current.flag) {
|
120975
120980
|
(0,_utils_util__WEBPACK_IMPORTED_MODULE_18__/* .getUrlStateFilter */ .a)(urlState != null ? urlState : {}, actionRef);
|
@@ -120992,7 +120997,7 @@ var ProTable = function ProTable(props) {
|
|
120992
120997
|
|
120993
120998
|
// 格式化后的请求参数
|
120994
120999
|
var requestData = {};
|
120995
|
-
var preParams = _extends({}, !showPagination ? _extends({}, dataFilterParams, propsParams, sortParams, columnsFilterParams) : _extends({}, dataFilterParams, propsParams, sortParams, columnsFilterParams, (
|
121000
|
+
var preParams = _extends({}, !showPagination ? _extends({}, dataFilterParams, propsParams, sortParams, columnsFilterParams) : _extends({}, dataFilterParams, propsParams, sortParams, columnsFilterParams, (_extends4 = {}, _extends4[targetPageKey] = currentPage, _extends4[targetPageSizeKey] = pageSize, _extends4)), params);
|
120996
121001
|
if (typeof formatParams === 'string') {
|
120997
121002
|
requestData = (0,_teamix_utils__WEBPACK_IMPORTED_MODULE_5__.getTargetValue)(formatParams, {
|
120998
121003
|
params: preParams
|
@@ -121110,7 +121115,7 @@ var ProTable = function ProTable(props) {
|
|
121110
121115
|
return true;
|
121111
121116
|
} : undefined,
|
121112
121117
|
onFilter: function onFilter(values) {
|
121113
|
-
var _actionRef$
|
121118
|
+
var _actionRef$current7, _request8;
|
121114
121119
|
// 全屏状态,判断全屏表单onFilter是否禁用
|
121115
121120
|
if (fullscreenState && !filterEnableRef.current.fullscreen) {
|
121116
121121
|
filterEnableRef.current.fullscreen = true;
|
@@ -121129,7 +121134,7 @@ var ProTable = function ProTable(props) {
|
|
121129
121134
|
}
|
121130
121135
|
}
|
121131
121136
|
// 搜索变化时,暂时先清空选择
|
121132
|
-
(_actionRef$
|
121137
|
+
(_actionRef$current7 = actionRef.current) == null ? void 0 : _actionRef$current7.clearRowSelection == null ? void 0 : _actionRef$current7.clearRowSelection();
|
121133
121138
|
setCurrentPage(1);
|
121134
121139
|
_request((_request8 = {}, _request8[targetPageKey] = 1, _request8[targetPageSizeKey] = pageSize, _request8), false, values);
|
121135
121140
|
},
|
@@ -121168,9 +121173,9 @@ var ProTable = function ProTable(props) {
|
|
121168
121173
|
mainAction: mainAction,
|
121169
121174
|
extra: extra,
|
121170
121175
|
toolBar: toolBar,
|
121171
|
-
actionRef: {
|
121176
|
+
actionRef: _extends({}, actionRef, {
|
121172
121177
|
current: actionRef.current
|
121173
|
-
},
|
121178
|
+
}),
|
121174
121179
|
columns: propsColumns,
|
121175
121180
|
dataFilter: dataFilter,
|
121176
121181
|
afterDataFilter: afterDataFilter,
|
@@ -121254,24 +121259,24 @@ var ProTable = function ProTable(props) {
|
|
121254
121259
|
} else return footerAction;
|
121255
121260
|
};
|
121256
121261
|
var onChangePagination = (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(function (currentPage, params) {
|
121257
|
-
var
|
121262
|
+
var _extends5;
|
121258
121263
|
if (params === void 0) {
|
121259
121264
|
params = {};
|
121260
121265
|
}
|
121261
121266
|
// 翻页默认清空选择
|
121262
121267
|
if (!reserveSelectedRecords) {
|
121263
|
-
var _actionRef$
|
121264
|
-
(_actionRef$
|
121268
|
+
var _actionRef$current8;
|
121269
|
+
(_actionRef$current8 = actionRef.current) == null ? void 0 : _actionRef$current8.clearRowSelection == null ? void 0 : _actionRef$current8.clearRowSelection();
|
121265
121270
|
}
|
121266
121271
|
setCurrentPage(currentPage);
|
121267
|
-
_request(_extends((
|
121272
|
+
_request(_extends((_extends5 = {}, _extends5[targetPageKey] = currentPage, _extends5.pageSize = pageSize, _extends5), params));
|
121268
121273
|
}, [reserveSelectedRecords, targetPageKey, actionRef, pageSize]);
|
121269
121274
|
var onChangePaginationSize = (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(function (currentPageSize) {
|
121270
121275
|
var _request10;
|
121271
121276
|
// 翻页默认清空选择
|
121272
121277
|
if (!reserveSelectedRecords) {
|
121273
|
-
var _actionRef$
|
121274
|
-
(_actionRef$
|
121278
|
+
var _actionRef$current9;
|
121279
|
+
(_actionRef$current9 = actionRef.current) == null ? void 0 : _actionRef$current9.clearRowSelection == null ? void 0 : _actionRef$current9.clearRowSelection();
|
121275
121280
|
}
|
121276
121281
|
setPageSize(currentPageSize);
|
121277
121282
|
setCurrentPage(1);
|