@azrico/reactgrid 1.3.34 → 1.3.35
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.
|
@@ -131,7 +131,7 @@ function DataGridEventsWrapper(props) {
|
|
|
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.current
|
|
134
|
+
}, [props.gridRef.current]);
|
|
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,8 +139,9 @@ function DataGridEventsWrapper(props) {
|
|
|
139
139
|
replace: false
|
|
140
140
|
});
|
|
141
141
|
}
|
|
142
|
-
}, [props.gridRef.current
|
|
142
|
+
}, [props.gridRef.current]);
|
|
143
143
|
_react.default.useEffect(() => {
|
|
144
|
+
if (!props.gridRef.current) return;
|
|
144
145
|
props.gridRef.current['refresh'] = refresh;
|
|
145
146
|
props.gridRef.current['refreshColumn'] = refreshColumn;
|
|
146
147
|
}, [props.gridRef.current, props.dataSource, refresh, refreshColumn]);
|
|
@@ -361,7 +362,7 @@ function DataGridCore(props) {
|
|
|
361
362
|
...props.static_gridOptions,
|
|
362
363
|
...props.dynamic_gridOptions,
|
|
363
364
|
rowIndexColumn: true,
|
|
364
|
-
handle: ref => props.gridRef.current = ref
|
|
365
|
+
handle: ref => props.gridRef.current = ref,
|
|
365
366
|
className: 'azgrid-flexed',
|
|
366
367
|
columns: props.columns,
|
|
367
368
|
dataSource: props.dataSource
|
package/package.json
CHANGED
package/src/views/DataGrid.tsx
CHANGED
|
@@ -284,15 +284,16 @@ function DataGridEventsWrapper(props: DataGridWrapperProps) {
|
|
|
284
284
|
(props.gridRef.current as any).setItemPropertyAt(index, col, dt[index][col]);
|
|
285
285
|
}
|
|
286
286
|
},
|
|
287
|
-
[props.gridRef.current
|
|
287
|
+
[props.gridRef.current]
|
|
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.current
|
|
294
|
+
}, [props.gridRef.current]);
|
|
295
295
|
React.useEffect(() => {
|
|
296
|
+
if (!props.gridRef.current) return;
|
|
296
297
|
props.gridRef.current['refresh'] = refresh;
|
|
297
298
|
props.gridRef.current['refreshColumn'] = refreshColumn;
|
|
298
299
|
}, [props.gridRef.current, props.dataSource, refresh, refreshColumn]);
|
|
@@ -545,7 +546,7 @@ function DataGridCore(props: DataGridWrapperProps) {
|
|
|
545
546
|
{...props.static_gridOptions}
|
|
546
547
|
{...props.dynamic_gridOptions}
|
|
547
548
|
rowIndexColumn
|
|
548
|
-
handle={(ref) => (props.gridRef.current = ref
|
|
549
|
+
handle={(ref) => (props.gridRef.current = ref)}
|
|
549
550
|
className={'azgrid-flexed'}
|
|
550
551
|
columns={props.columns}
|
|
551
552
|
dataSource={props.dataSource}
|