@azrico/reactgrid 1.2.22 → 1.2.23
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/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
### [1.2.23](https://github.com/Azrideus/azrico-reactgrid/compare/v1.2.22...v1.2.23) (2023-04-03)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
* styling ([9018f75](https://github.com/Azrideus/azrico-reactgrid/commit/9018f7593e253720f751f52855a2d956dfc578ed))
|
|
11
|
+
|
|
5
12
|
### [1.2.22](https://github.com/Azrideus/azrico-reactgrid/compare/v1.2.21...v1.2.22) (2023-04-03)
|
|
6
13
|
|
|
7
14
|
### [1.2.21](https://github.com/Azrideus/azrico-reactgrid/compare/v1.2.20...v1.2.21) (2023-04-03)
|
|
@@ -118,7 +118,7 @@ function DataGridEventsWrapper(props) {
|
|
|
118
118
|
const [menuRow, set_menuRow] = _react.default.useState(null);
|
|
119
119
|
/* --------------------------------- events --------------------------------- */
|
|
120
120
|
const onRowContextMenu = _react.default.useCallback((rowProps, event) => {
|
|
121
|
-
if (_func_child.func_selection.has_selection()) return;
|
|
121
|
+
if (!rowProps || !rowProps.data || _func_child.func_selection.has_selection()) return;
|
|
122
122
|
update_menuRow(rowProps.data);
|
|
123
123
|
update_menuAnchorEl(_func_child.func_selection.getVirtualElement(event.clientX, event.clientY));
|
|
124
124
|
event.preventDefault();
|
|
@@ -221,17 +221,17 @@ function DataGridDetailsWrapper(props) {
|
|
|
221
221
|
}
|
|
222
222
|
function DataGridSizeWrapper(props) {
|
|
223
223
|
if (props.delayedSize) {
|
|
224
|
-
return _react.default.createElement(
|
|
224
|
+
return _react.default.createElement(DataGridDelayedSizeWrapper, {
|
|
225
225
|
...props
|
|
226
226
|
});
|
|
227
227
|
} else {
|
|
228
|
-
return _react.default.createElement(
|
|
228
|
+
return _react.default.createElement(DataGridCore, {
|
|
229
229
|
...props
|
|
230
230
|
});
|
|
231
231
|
}
|
|
232
232
|
}
|
|
233
233
|
/* -------------------------------------------------------------------------- */
|
|
234
|
-
function
|
|
234
|
+
function DataGridDelayedSizeWrapper(props) {
|
|
235
235
|
const {
|
|
236
236
|
ref,
|
|
237
237
|
height,
|
|
@@ -240,20 +240,16 @@ function DataGridDelayedSize(props) {
|
|
|
240
240
|
return _react.default.createElement("div", {
|
|
241
241
|
ref: ref,
|
|
242
242
|
className: (0, _clsx.default)(props.className, 'azgrid-nooverflow', 'azgrid-filler')
|
|
243
|
-
}, _react.default.createElement(
|
|
244
|
-
...props.static_gridOptions,
|
|
245
|
-
...props.dynamic_gridOptions,
|
|
246
|
-
handle: ref => props.gridRef.current = ref ? ref.current : null,
|
|
247
|
-
className: 'azgrid-delayedresize',
|
|
243
|
+
}, _react.default.createElement("div", {
|
|
248
244
|
style: {
|
|
249
245
|
height: height,
|
|
250
246
|
width: width
|
|
251
|
-
}
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
})
|
|
247
|
+
}
|
|
248
|
+
}, _react.default.createElement(DataGridCore, {
|
|
249
|
+
...props
|
|
250
|
+
})));
|
|
255
251
|
}
|
|
256
|
-
function
|
|
252
|
+
function DataGridCore(props) {
|
|
257
253
|
return _react.default.createElement("div", {
|
|
258
254
|
className: (0, _clsx.default)(props.className, 'azgrid-nooverflow', 'azgrid-filler')
|
|
259
255
|
}, _react.default.createElement(_reactdatagridEnterprise.default, {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@azrico/reactgrid",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.23",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"description": "React Datagrid",
|
|
6
6
|
"author": "Azrideus <MehrdadTavangar@gmail.com>",
|
|
@@ -33,19 +33,19 @@
|
|
|
33
33
|
"@azrico/object": "^1.3.1",
|
|
34
34
|
"@emotion/react": "^11.9.3",
|
|
35
35
|
"@emotion/styled": "^11.9.3",
|
|
36
|
-
"@inovua/reactdatagrid-enterprise": "^5.8.
|
|
36
|
+
"@inovua/reactdatagrid-enterprise": "^5.8.5",
|
|
37
37
|
"clsx": "^1.2.1",
|
|
38
38
|
"react": "^18.2.0",
|
|
39
39
|
"react-use-size": "^3.0.1"
|
|
40
40
|
},
|
|
41
41
|
"peerDependencies": {
|
|
42
|
-
"@azrico/controls": "
|
|
43
|
-
"@emotion/react": "
|
|
44
|
-
"@emotion/styled": "
|
|
45
|
-
"@inovua/reactdatagrid-enterprise": "
|
|
46
|
-
"clsx": "
|
|
47
|
-
"react": "
|
|
48
|
-
"react-use-size": "
|
|
42
|
+
"@azrico/controls": ">=1.4.26",
|
|
43
|
+
"@emotion/react": ">=11.9.3",
|
|
44
|
+
"@emotion/styled": ">=11.9.3",
|
|
45
|
+
"@inovua/reactdatagrid-enterprise": ">=5.8.5",
|
|
46
|
+
"clsx": ">=1.2.1",
|
|
47
|
+
"react": ">=18.2.0",
|
|
48
|
+
"react-use-size": ">=3.0.1"
|
|
49
49
|
},
|
|
50
50
|
"browserslist": {
|
|
51
51
|
"production": [
|
package/src/views/DataGrid.tsx
CHANGED
|
@@ -264,7 +264,7 @@ function DataGridEventsWrapper(props: DataGridWrapperProps) {
|
|
|
264
264
|
/* --------------------------------- events --------------------------------- */
|
|
265
265
|
|
|
266
266
|
const onRowContextMenu = React.useCallback((rowProps, event) => {
|
|
267
|
-
if (func_selection.has_selection()) return;
|
|
267
|
+
if (!rowProps || !rowProps.data || func_selection.has_selection()) return;
|
|
268
268
|
update_menuRow(rowProps.data);
|
|
269
269
|
update_menuAnchorEl(func_selection.getVirtualElement(event.clientX, event.clientY));
|
|
270
270
|
event.preventDefault();
|
|
@@ -393,37 +393,27 @@ function DataGridDetailsWrapper(props: DataGridWrapperProps) {
|
|
|
393
393
|
|
|
394
394
|
function DataGridSizeWrapper(props: DataGridWrapperProps) {
|
|
395
395
|
if (props.delayedSize) {
|
|
396
|
-
return <
|
|
396
|
+
return <DataGridDelayedSizeWrapper {...props} />;
|
|
397
397
|
} else {
|
|
398
|
-
return <
|
|
398
|
+
return <DataGridCore {...props} />;
|
|
399
399
|
}
|
|
400
400
|
}
|
|
401
401
|
|
|
402
402
|
/* -------------------------------------------------------------------------- */
|
|
403
|
-
function
|
|
403
|
+
function DataGridDelayedSizeWrapper(props: DataGridWrapperProps) {
|
|
404
404
|
const { ref, height, width } = useComponentSize();
|
|
405
405
|
return (
|
|
406
406
|
<div
|
|
407
407
|
ref={ref}
|
|
408
408
|
className={clsx(props.className, 'azgrid-nooverflow', 'azgrid-filler')}
|
|
409
409
|
>
|
|
410
|
-
<
|
|
411
|
-
{...props
|
|
412
|
-
|
|
413
|
-
handle={(ref) => (props.gridRef.current = ref ? ref.current : null)}
|
|
414
|
-
className={'azgrid-delayedresize'}
|
|
415
|
-
style={{
|
|
416
|
-
height: height,
|
|
417
|
-
width: width,
|
|
418
|
-
}}
|
|
419
|
-
columns={props.columns}
|
|
420
|
-
dataSource={props.dataSource}
|
|
421
|
-
/>
|
|
422
|
-
{props.children}
|
|
410
|
+
<div style={{ height: height, width: width }}>
|
|
411
|
+
<DataGridCore {...props} />
|
|
412
|
+
</div>
|
|
423
413
|
</div>
|
|
424
414
|
);
|
|
425
415
|
}
|
|
426
|
-
function
|
|
416
|
+
function DataGridCore(props: DataGridWrapperProps) {
|
|
427
417
|
return (
|
|
428
418
|
<div className={clsx(props.className, 'azgrid-nooverflow', 'azgrid-filler')}>
|
|
429
419
|
<ReactDataGrid
|