@nokecy/qc-ui 0.0.9 → 0.0.11
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.
|
@@ -33,7 +33,7 @@ var _icons = require("@ant-design/icons");
|
|
|
33
33
|
|
|
34
34
|
var _utils = require("./utils");
|
|
35
35
|
|
|
36
|
-
var _excluded = ["style", "params", "request", "dataSource", "headerTitle", "toolBarRender", "search", "onGridReady", "gridKey", "gridColumnState", "children"];
|
|
36
|
+
var _excluded = ["style", "params", "request", "dataSource", "headerTitle", "toolBarRender", "search", "hideRedo", "onGridReady", "gridKey", "gridColumnState", "children"];
|
|
37
37
|
|
|
38
38
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
39
39
|
|
|
@@ -77,6 +77,7 @@ function AgGridPlus(props) {
|
|
|
77
77
|
headerTitle = props.headerTitle,
|
|
78
78
|
toolBarRender = props.toolBarRender,
|
|
79
79
|
search = props.search,
|
|
80
|
+
hideRedo = props.hideRedo,
|
|
80
81
|
onReady = props.onGridReady,
|
|
81
82
|
gridKey = props.gridKey,
|
|
82
83
|
gridColumnState = props.gridColumnState,
|
|
@@ -147,6 +148,9 @@ function AgGridPlus(props) {
|
|
|
147
148
|
});
|
|
148
149
|
}
|
|
149
150
|
}, [gridColumnState, columnsRef.current]);
|
|
151
|
+
(0, _react.useEffect)(function () {
|
|
152
|
+
setRowData(dataSource || rowData);
|
|
153
|
+
}, [dataSource, rowData]);
|
|
150
154
|
var onGridReady = (0, _react.useCallback)(function (params) {
|
|
151
155
|
apiRef.current = params.api;
|
|
152
156
|
columnsRef.current = params.columnApi;
|
|
@@ -242,7 +246,7 @@ function AgGridPlus(props) {
|
|
|
242
246
|
flexDirection: "column",
|
|
243
247
|
height: "100%"
|
|
244
248
|
}, style)
|
|
245
|
-
}, /*#__PURE__*/_react.default.createElement(_toolBar.default, {
|
|
249
|
+
}, hideRedo ? null : /*#__PURE__*/_react.default.createElement(_toolBar.default, {
|
|
246
250
|
title: headerTitle,
|
|
247
251
|
actions: actionDom,
|
|
248
252
|
settings: [/*#__PURE__*/_react.default.createElement(_settingItem.default, {
|
|
@@ -304,7 +308,8 @@ function AgGridPlus(props) {
|
|
|
304
308
|
headerCheckboxSelection: true,
|
|
305
309
|
checkboxSelection: true,
|
|
306
310
|
showDisabledCheckboxes: true,
|
|
307
|
-
filter: false
|
|
311
|
+
filter: false,
|
|
312
|
+
pinned: "left"
|
|
308
313
|
}) : null, _react.default.Children.map(children, function (child, index) {
|
|
309
314
|
return child;
|
|
310
315
|
}))), /*#__PURE__*/_react.default.createElement("div", {
|
|
@@ -332,7 +337,7 @@ function AgGridPlus(props) {
|
|
|
332
337
|
size: "small" // showTotal={(total, range) => `${range[0]}-${range[1]} of ${total} items`}
|
|
333
338
|
,
|
|
334
339
|
pageSizeOptions: [10, 100, 200, 500, 1000],
|
|
335
|
-
hideOnSinglePage:
|
|
340
|
+
hideOnSinglePage: true,
|
|
336
341
|
showQuickJumper: false
|
|
337
342
|
})))));
|
|
338
343
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var _excluded = ["style", "params", "request", "dataSource", "headerTitle", "toolBarRender", "search", "onGridReady", "gridKey", "gridColumnState", "children"];
|
|
1
|
+
var _excluded = ["style", "params", "request", "dataSource", "headerTitle", "toolBarRender", "search", "hideRedo", "onGridReady", "gridKey", "gridColumnState", "children"];
|
|
2
2
|
|
|
3
3
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
4
4
|
|
|
@@ -50,6 +50,7 @@ function AgGridPlus(props) {
|
|
|
50
50
|
headerTitle = props.headerTitle,
|
|
51
51
|
toolBarRender = props.toolBarRender,
|
|
52
52
|
search = props.search,
|
|
53
|
+
hideRedo = props.hideRedo,
|
|
53
54
|
onReady = props.onGridReady,
|
|
54
55
|
gridKey = props.gridKey,
|
|
55
56
|
gridColumnState = props.gridColumnState,
|
|
@@ -120,6 +121,9 @@ function AgGridPlus(props) {
|
|
|
120
121
|
});
|
|
121
122
|
}
|
|
122
123
|
}, [gridColumnState, columnsRef.current]);
|
|
124
|
+
useEffect(function () {
|
|
125
|
+
setRowData(dataSource || rowData);
|
|
126
|
+
}, [dataSource, rowData]);
|
|
123
127
|
var onGridReady = useCallback(function (params) {
|
|
124
128
|
apiRef.current = params.api;
|
|
125
129
|
columnsRef.current = params.columnApi;
|
|
@@ -215,7 +219,7 @@ function AgGridPlus(props) {
|
|
|
215
219
|
flexDirection: "column",
|
|
216
220
|
height: "100%"
|
|
217
221
|
}, style)
|
|
218
|
-
}, /*#__PURE__*/React.createElement(ToolBar, {
|
|
222
|
+
}, hideRedo ? null : /*#__PURE__*/React.createElement(ToolBar, {
|
|
219
223
|
title: headerTitle,
|
|
220
224
|
actions: actionDom,
|
|
221
225
|
settings: [/*#__PURE__*/React.createElement(SettingItem, {
|
|
@@ -277,7 +281,8 @@ function AgGridPlus(props) {
|
|
|
277
281
|
headerCheckboxSelection: true,
|
|
278
282
|
checkboxSelection: true,
|
|
279
283
|
showDisabledCheckboxes: true,
|
|
280
|
-
filter: false
|
|
284
|
+
filter: false,
|
|
285
|
+
pinned: "left"
|
|
281
286
|
}) : null, React.Children.map(children, function (child, index) {
|
|
282
287
|
return child;
|
|
283
288
|
}))), /*#__PURE__*/React.createElement("div", {
|
|
@@ -305,7 +310,7 @@ function AgGridPlus(props) {
|
|
|
305
310
|
size: "small" // showTotal={(total, range) => `${range[0]}-${range[1]} of ${total} items`}
|
|
306
311
|
,
|
|
307
312
|
pageSizeOptions: [10, 100, 200, 500, 1000],
|
|
308
|
-
hideOnSinglePage:
|
|
313
|
+
hideOnSinglePage: true,
|
|
309
314
|
showQuickJumper: false
|
|
310
315
|
})))));
|
|
311
316
|
}
|