@nokecy/qc-ui 1.0.14 → 1.0.16
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/cjs/ag-grid-plus/ag-gridPlus.js +1 -1
- package/dist/cjs/ag-grid-plus/setting/index.js +6 -8
- package/dist/cjs/array-table/index.js +4 -2
- package/dist/esm/ag-grid-plus/ag-gridPlus.js +1 -1
- package/dist/esm/ag-grid-plus/setting/index.js +6 -8
- package/dist/esm/array-table/index.js +4 -2
- package/dist/umd/qc-ui.min.js +1 -1
- package/package.json +1 -1
|
@@ -169,7 +169,7 @@ function AgGridPlus(props) {
|
|
|
169
169
|
applyOrder: true
|
|
170
170
|
});
|
|
171
171
|
}
|
|
172
|
-
}, [gridPlusColumnState, apiRef.current]);
|
|
172
|
+
}, [gridPlusColumnState, apiRef.current, rowData]);
|
|
173
173
|
(0, _react.useEffect)(function () {
|
|
174
174
|
setRowData(dataSource || propRowData || []);
|
|
175
175
|
}, [dataSource, propRowData]);
|
|
@@ -69,6 +69,9 @@ var Setting = function Setting(props) {
|
|
|
69
69
|
if (!gridKey) {
|
|
70
70
|
return null;
|
|
71
71
|
}
|
|
72
|
+
var tableProps = {
|
|
73
|
+
onRowDrag: true
|
|
74
|
+
};
|
|
72
75
|
return /*#__PURE__*/_react2.default.createElement(_antdV.FormDialog.Portal, {
|
|
73
76
|
id: portalId
|
|
74
77
|
}, /*#__PURE__*/_react2.default.createElement("div", {
|
|
@@ -93,16 +96,11 @@ var Setting = function Setting(props) {
|
|
|
93
96
|
maxColumns: [1, 3],
|
|
94
97
|
strictAutoFit: true
|
|
95
98
|
}
|
|
96
|
-
},
|
|
97
|
-
/*#__PURE__*/
|
|
98
|
-
//@ts-ignore
|
|
99
|
-
_react2.default.createElement(SchemaField.Array, {
|
|
99
|
+
}, /*#__PURE__*/_react2.default.createElement(SchemaField.Array, {
|
|
100
100
|
name: "items",
|
|
101
101
|
title: "",
|
|
102
102
|
"x-component": "ArrayTable",
|
|
103
|
-
"x-component-props":
|
|
104
|
-
onRowDrag: true
|
|
105
|
-
},
|
|
103
|
+
"x-component-props": tableProps,
|
|
106
104
|
"x-validator": [{
|
|
107
105
|
message: ""
|
|
108
106
|
}],
|
|
@@ -175,7 +173,7 @@ var Setting = function Setting(props) {
|
|
|
175
173
|
value: "right",
|
|
176
174
|
label: "右固定"
|
|
177
175
|
}, {
|
|
178
|
-
value:
|
|
176
|
+
value: 'notPinned',
|
|
179
177
|
label: "不固定"
|
|
180
178
|
}]
|
|
181
179
|
})), /*#__PURE__*/_react2.default.createElement(SchemaField.Void, {
|
|
@@ -60,14 +60,16 @@ var ArrayTable = (0, _react2.observer)(function (props) {
|
|
|
60
60
|
onSaveColumnState = _useGridPlusColumnSta.onSaveColumnState,
|
|
61
61
|
gridPlusColumnState = _useGridPlusColumnSta.columnState,
|
|
62
62
|
extensibleColumns = _useGridPlusColumnSta.extensibleColumns;
|
|
63
|
+
// const teststyle = '[{\"id\":\"18\",\"field\":\"xdxcp47tycp\",\"headerName\":\"A1\",\"width\":800,\"hide\":false,\"colId\":\"a1\",\"pinned\":null,\"sort\":null,\"sortIndex\":null,\"aggFunc\":null,\"rowGroup\":false,\"rowGroupIndex\":null,\"pivot\":false,\"pivotIndex\":null,\"flex\":null},{\"id\":\"19\",\"field\":\"nvhezzkyak9\",\"headerName\":\"Operations\",\"width\":60,\"hide\":false,\"colId\":\"nvhezzkyak9\",\"pinned\":null,\"sort\":null,\"sortIndex\":null,\"aggFunc\":null,\"rowGroup\":false,\"rowGroupIndex\":null,\"pivot\":false,\"pivotIndex\":null,\"flex\":null}]'
|
|
64
|
+
|
|
63
65
|
(0, _react.useEffect)(function () {
|
|
64
|
-
if (
|
|
66
|
+
if (props.gridKey && gridPlusColumnState && gridPlusColumnState[props.gridKey] && apiRef.current) {
|
|
65
67
|
apiRef.current.applyColumnState({
|
|
66
68
|
state: gridPlusColumnState[props.gridKey],
|
|
67
69
|
applyOrder: true
|
|
68
70
|
});
|
|
69
71
|
}
|
|
70
|
-
}, [gridPlusColumnState, apiRef.current]);
|
|
72
|
+
}, [gridPlusColumnState, apiRef.current, dataSource]);
|
|
71
73
|
|
|
72
74
|
//@ts-ignore
|
|
73
75
|
if (columns.length > 0) {
|
|
@@ -160,7 +160,7 @@ function AgGridPlus(props) {
|
|
|
160
160
|
applyOrder: true
|
|
161
161
|
});
|
|
162
162
|
}
|
|
163
|
-
}, [gridPlusColumnState, apiRef.current]);
|
|
163
|
+
}, [gridPlusColumnState, apiRef.current, rowData]);
|
|
164
164
|
useEffect(function () {
|
|
165
165
|
setRowData(dataSource || propRowData || []);
|
|
166
166
|
}, [dataSource, propRowData]);
|
|
@@ -60,6 +60,9 @@ var Setting = function Setting(props) {
|
|
|
60
60
|
if (!gridKey) {
|
|
61
61
|
return null;
|
|
62
62
|
}
|
|
63
|
+
var tableProps = {
|
|
64
|
+
onRowDrag: true
|
|
65
|
+
};
|
|
63
66
|
return /*#__PURE__*/React.createElement(FormDialog.Portal, {
|
|
64
67
|
id: portalId
|
|
65
68
|
}, /*#__PURE__*/React.createElement("div", {
|
|
@@ -84,16 +87,11 @@ var Setting = function Setting(props) {
|
|
|
84
87
|
maxColumns: [1, 3],
|
|
85
88
|
strictAutoFit: true
|
|
86
89
|
}
|
|
87
|
-
},
|
|
88
|
-
/*#__PURE__*/
|
|
89
|
-
//@ts-ignore
|
|
90
|
-
React.createElement(SchemaField.Array, {
|
|
90
|
+
}, /*#__PURE__*/React.createElement(SchemaField.Array, {
|
|
91
91
|
name: "items",
|
|
92
92
|
title: "",
|
|
93
93
|
"x-component": "ArrayTable",
|
|
94
|
-
"x-component-props":
|
|
95
|
-
onRowDrag: true
|
|
96
|
-
},
|
|
94
|
+
"x-component-props": tableProps,
|
|
97
95
|
"x-validator": [{
|
|
98
96
|
message: ""
|
|
99
97
|
}],
|
|
@@ -166,7 +164,7 @@ var Setting = function Setting(props) {
|
|
|
166
164
|
value: "right",
|
|
167
165
|
label: "右固定"
|
|
168
166
|
}, {
|
|
169
|
-
value:
|
|
167
|
+
value: 'notPinned',
|
|
170
168
|
label: "不固定"
|
|
171
169
|
}]
|
|
172
170
|
})), /*#__PURE__*/React.createElement(SchemaField.Void, {
|
|
@@ -54,14 +54,16 @@ var ArrayTable = observer(function (props) {
|
|
|
54
54
|
onSaveColumnState = _useGridPlusColumnSta.onSaveColumnState,
|
|
55
55
|
gridPlusColumnState = _useGridPlusColumnSta.columnState,
|
|
56
56
|
extensibleColumns = _useGridPlusColumnSta.extensibleColumns;
|
|
57
|
+
// const teststyle = '[{\"id\":\"18\",\"field\":\"xdxcp47tycp\",\"headerName\":\"A1\",\"width\":800,\"hide\":false,\"colId\":\"a1\",\"pinned\":null,\"sort\":null,\"sortIndex\":null,\"aggFunc\":null,\"rowGroup\":false,\"rowGroupIndex\":null,\"pivot\":false,\"pivotIndex\":null,\"flex\":null},{\"id\":\"19\",\"field\":\"nvhezzkyak9\",\"headerName\":\"Operations\",\"width\":60,\"hide\":false,\"colId\":\"nvhezzkyak9\",\"pinned\":null,\"sort\":null,\"sortIndex\":null,\"aggFunc\":null,\"rowGroup\":false,\"rowGroupIndex\":null,\"pivot\":false,\"pivotIndex\":null,\"flex\":null}]'
|
|
58
|
+
|
|
57
59
|
useEffect(function () {
|
|
58
|
-
if (
|
|
60
|
+
if (props.gridKey && gridPlusColumnState && gridPlusColumnState[props.gridKey] && apiRef.current) {
|
|
59
61
|
apiRef.current.applyColumnState({
|
|
60
62
|
state: gridPlusColumnState[props.gridKey],
|
|
61
63
|
applyOrder: true
|
|
62
64
|
});
|
|
63
65
|
}
|
|
64
|
-
}, [gridPlusColumnState, apiRef.current]);
|
|
66
|
+
}, [gridPlusColumnState, apiRef.current, dataSource]);
|
|
65
67
|
|
|
66
68
|
//@ts-ignore
|
|
67
69
|
if (columns.length > 0) {
|