@azrico/reactgrid 1.3.33 → 1.3.34
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.
|
@@ -126,12 +126,12 @@ function DataGridEventsWrapper(props) {
|
|
|
126
126
|
/* -------------------------------------------------------------------------- */
|
|
127
127
|
/* refresh functions */
|
|
128
128
|
/* -------------------------------------------------------------------------- */
|
|
129
|
-
const
|
|
129
|
+
const refreshColumn = _react.default.useCallback(col => {
|
|
130
130
|
const dt = props.gridRef.current.ungroupedData;
|
|
131
131
|
for (let index = 0; index < dt.length; index++) {
|
|
132
132
|
props.gridRef.current.setItemPropertyAt(index, col, dt[index][col]);
|
|
133
133
|
}
|
|
134
|
-
}, [props.gridRef]);
|
|
134
|
+
}, [props.gridRef.current, props.gridRef.current.ungroupedData]);
|
|
135
135
|
const refresh = _react.default.useCallback(() => {
|
|
136
136
|
const dt = props.gridRef.current.ungroupedData;
|
|
137
137
|
for (let index = 0; index < dt.length; index++) {
|
|
@@ -139,11 +139,11 @@ function DataGridEventsWrapper(props) {
|
|
|
139
139
|
replace: false
|
|
140
140
|
});
|
|
141
141
|
}
|
|
142
|
-
}, [props.gridRef]);
|
|
142
|
+
}, [props.gridRef.current, props.gridRef.current.ungroupedData]);
|
|
143
143
|
_react.default.useEffect(() => {
|
|
144
144
|
props.gridRef.current['refresh'] = refresh;
|
|
145
|
-
props.gridRef.current['
|
|
146
|
-
}, [refresh,
|
|
145
|
+
props.gridRef.current['refreshColumn'] = refreshColumn;
|
|
146
|
+
}, [props.gridRef.current, props.dataSource, refresh, refreshColumn]);
|
|
147
147
|
/* -------------------------------------------------------------------------- */
|
|
148
148
|
/* events */
|
|
149
149
|
/* -------------------------------------------------------------------------- */
|
package/package.json
CHANGED
package/src/views/DataGrid.tsx
CHANGED
|
@@ -277,25 +277,25 @@ function DataGridEventsWrapper(props: DataGridWrapperProps) {
|
|
|
277
277
|
/* -------------------------------------------------------------------------- */
|
|
278
278
|
/* refresh functions */
|
|
279
279
|
/* -------------------------------------------------------------------------- */
|
|
280
|
-
const
|
|
280
|
+
const refreshColumn = React.useCallback(
|
|
281
281
|
(col: string) => {
|
|
282
282
|
const dt = props.gridRef.current.ungroupedData;
|
|
283
283
|
for (let index = 0; index < dt.length; index++) {
|
|
284
284
|
(props.gridRef.current as any).setItemPropertyAt(index, col, dt[index][col]);
|
|
285
285
|
}
|
|
286
286
|
},
|
|
287
|
-
[props.gridRef]
|
|
287
|
+
[props.gridRef.current, props.gridRef.current.ungroupedData]
|
|
288
288
|
);
|
|
289
289
|
const refresh = React.useCallback(() => {
|
|
290
290
|
const dt = props.gridRef.current.ungroupedData;
|
|
291
291
|
for (let index = 0; index < dt.length; index++) {
|
|
292
292
|
(props.gridRef.current as any).setItemAt(index, {}, { replace: false });
|
|
293
293
|
}
|
|
294
|
-
}, [props.gridRef]);
|
|
294
|
+
}, [props.gridRef.current, props.gridRef.current.ungroupedData]);
|
|
295
295
|
React.useEffect(() => {
|
|
296
296
|
props.gridRef.current['refresh'] = refresh;
|
|
297
|
-
props.gridRef.current['
|
|
298
|
-
}, [refresh,
|
|
297
|
+
props.gridRef.current['refreshColumn'] = refreshColumn;
|
|
298
|
+
}, [props.gridRef.current, props.dataSource, refresh, refreshColumn]);
|
|
299
299
|
/* -------------------------------------------------------------------------- */
|
|
300
300
|
/* events */
|
|
301
301
|
/* -------------------------------------------------------------------------- */
|