ztxkui 2.1.9 → 2.2.0
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.
|
@@ -118,9 +118,10 @@ function Table(props) {
|
|
|
118
118
|
* @description 动态列配置重置功能
|
|
119
119
|
*/
|
|
120
120
|
var resetDynamicHandle = useCallback(function () {
|
|
121
|
-
|
|
121
|
+
var _initColumns = initColumns || columns;
|
|
122
|
+
setColumns(_initColumns);
|
|
122
123
|
onDynamicChange &&
|
|
123
|
-
onDynamicChange((
|
|
124
|
+
onDynamicChange((_initColumns || []).map(function (item) {
|
|
124
125
|
if (item.dataIndex || item.key) {
|
|
125
126
|
return {
|
|
126
127
|
dataIndex: item.dataIndex,
|
|
@@ -131,7 +132,7 @@ function Table(props) {
|
|
|
131
132
|
return __assign({}, item);
|
|
132
133
|
}));
|
|
133
134
|
hideDynamicHandle();
|
|
134
|
-
}, [initColumns, hideDynamicHandle, onDynamicChange]);
|
|
135
|
+
}, [initColumns, columns, hideDynamicHandle, onDynamicChange]);
|
|
135
136
|
/**
|
|
136
137
|
* @description 切换行位置
|
|
137
138
|
*/
|