@azrico/reactgrid 1.2.42 → 1.2.44
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 +28 -0
- package/dist/src/views/DataGrid.js +5 -14
- package/package.json +3 -3
- package/src/views/DataGrid.tsx +7 -15
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,34 @@
|
|
|
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.44](https://github.com/Azrideus/azrico-reactgrid/compare/v1.2.10...v1.2.44) (2023-07-09)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
* editable can be a function ([6ea857e](https://github.com/Azrideus/azrico-reactgrid/commit/6ea857e4f403d2a334dc5e74065f6b8033277ca4))
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### Bug Fixes
|
|
14
|
+
|
|
15
|
+
* DataGridDelayedSizeWrapper actual delayed ([2ddfd2f](https://github.com/Azrideus/azrico-reactgrid/commit/2ddfd2fb58c90bd906e1330f22f0ef7468d34afb))
|
|
16
|
+
* onCellSelectionChange ([95c8f54](https://github.com/Azrideus/azrico-reactgrid/commit/95c8f540e94dde0c7e245fb29fb6afc7172957ec))
|
|
17
|
+
* styling ([9018f75](https://github.com/Azrideus/azrico-reactgrid/commit/9018f7593e253720f751f52855a2d956dfc578ed))
|
|
18
|
+
|
|
19
|
+
### [1.2.43](https://github.com/Azrideus/azrico-reactgrid/compare/v1.2.10...v1.2.43) (2023-07-09)
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
### Features
|
|
23
|
+
|
|
24
|
+
* editable can be a function ([6ea857e](https://github.com/Azrideus/azrico-reactgrid/commit/6ea857e4f403d2a334dc5e74065f6b8033277ca4))
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
### Bug Fixes
|
|
28
|
+
|
|
29
|
+
* DataGridDelayedSizeWrapper actual delayed ([2ddfd2f](https://github.com/Azrideus/azrico-reactgrid/commit/2ddfd2fb58c90bd906e1330f22f0ef7468d34afb))
|
|
30
|
+
* onCellSelectionChange ([95c8f54](https://github.com/Azrideus/azrico-reactgrid/commit/95c8f540e94dde0c7e245fb29fb6afc7172957ec))
|
|
31
|
+
* styling ([9018f75](https://github.com/Azrideus/azrico-reactgrid/commit/9018f7593e253720f751f52855a2d956dfc578ed))
|
|
32
|
+
|
|
5
33
|
### [1.2.42](https://github.com/Azrideus/azrico-reactgrid/compare/v1.2.10...v1.2.42) (2023-07-09)
|
|
6
34
|
|
|
7
35
|
|
|
@@ -136,32 +136,23 @@ function DataGridEventsWrapper(props) {
|
|
|
136
136
|
const onRowContextMenu = _react.default.useCallback((rowProps, event) => {
|
|
137
137
|
if (!rowProps || !rowProps.data || _func_child.func_selection.has_selection()) return;
|
|
138
138
|
const anEl = _func_child.func_selection.getVirtualElement(event.clientX, event.clientY);
|
|
139
|
-
console.log('onRowContextMenu', anEl);
|
|
140
139
|
update_menuAnchorEl(anEl);
|
|
141
140
|
}, []);
|
|
141
|
+
const update_menuAnchorEl = _react.default.useCallback(el => {
|
|
142
|
+
set_menuAnchorEl(el || null);
|
|
143
|
+
}, []);
|
|
142
144
|
const renderRowContextMenu = _react.default.useCallback((menuProps, {
|
|
143
145
|
rowProps
|
|
144
146
|
}) => {
|
|
145
147
|
console.log('cm:', menuAnchorEl);
|
|
146
|
-
// menuProps.autoDismiss = true;
|
|
147
|
-
// menuProps.items = [
|
|
148
|
-
// {
|
|
149
|
-
// label: 'Row ' + rowProps.rowIndex,
|
|
150
|
-
// },
|
|
151
|
-
// {
|
|
152
|
-
// label: 'Want to visit ',
|
|
153
|
-
// },
|
|
154
|
-
// ];
|
|
155
148
|
return _react.default.createElement(_controls.ContextMenu, {
|
|
149
|
+
dontAutoClose: true,
|
|
156
150
|
menuAnchorEl: menuAnchorEl,
|
|
157
151
|
set_menuAnchorEl: update_menuAnchorEl,
|
|
158
152
|
menuRow: rowProps.data,
|
|
159
153
|
menu_items: props.contextMenuItems
|
|
160
154
|
});
|
|
161
|
-
}, [props.contextMenuItems]);
|
|
162
|
-
const update_menuAnchorEl = _react.default.useCallback(el => {
|
|
163
|
-
set_menuAnchorEl(el || null);
|
|
164
|
-
}, []);
|
|
155
|
+
}, [props.contextMenuItems, menuAnchorEl, update_menuAnchorEl]);
|
|
165
156
|
/**
|
|
166
157
|
* Merge click events into grid options
|
|
167
158
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@azrico/reactgrid",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.44",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"description": "React Datagrid",
|
|
6
6
|
"author": "Azrideus <MehrdadTavangar@gmail.com>",
|
|
@@ -29,8 +29,8 @@
|
|
|
29
29
|
"typescript": "^4.8.4"
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@azrico/controls": "1.5.
|
|
33
|
-
"@azrico/object": "^1.4.
|
|
32
|
+
"@azrico/controls": "^1.5.57",
|
|
33
|
+
"@azrico/object": "^1.4.35",
|
|
34
34
|
"@emotion/react": "^11.9.3",
|
|
35
35
|
"@emotion/styled": "^11.9.3",
|
|
36
36
|
"@inovua/reactdatagrid-enterprise": "^5.8.5",
|
package/src/views/DataGrid.tsx
CHANGED
|
@@ -291,23 +291,19 @@ function DataGridEventsWrapper(props: DataGridWrapperProps) {
|
|
|
291
291
|
const onRowContextMenu = React.useCallback((rowProps, event) => {
|
|
292
292
|
if (!rowProps || !rowProps.data || func_selection.has_selection()) return;
|
|
293
293
|
const anEl = func_selection.getVirtualElement(event.clientX, event.clientY);
|
|
294
|
-
console.log('onRowContextMenu', anEl);
|
|
295
294
|
update_menuAnchorEl(anEl);
|
|
296
295
|
}, []);
|
|
296
|
+
|
|
297
|
+
const update_menuAnchorEl = React.useCallback((el) => {
|
|
298
|
+
set_menuAnchorEl(el || null);
|
|
299
|
+
}, []);
|
|
300
|
+
|
|
297
301
|
const renderRowContextMenu = React.useCallback(
|
|
298
302
|
(menuProps, { rowProps }) => {
|
|
299
303
|
console.log('cm:', menuAnchorEl);
|
|
300
|
-
// menuProps.autoDismiss = true;
|
|
301
|
-
// menuProps.items = [
|
|
302
|
-
// {
|
|
303
|
-
// label: 'Row ' + rowProps.rowIndex,
|
|
304
|
-
// },
|
|
305
|
-
// {
|
|
306
|
-
// label: 'Want to visit ',
|
|
307
|
-
// },
|
|
308
|
-
// ];
|
|
309
304
|
return (
|
|
310
305
|
<ContextMenu
|
|
306
|
+
dontAutoClose
|
|
311
307
|
menuAnchorEl={menuAnchorEl}
|
|
312
308
|
set_menuAnchorEl={update_menuAnchorEl}
|
|
313
309
|
menuRow={rowProps.data}
|
|
@@ -315,12 +311,8 @@ function DataGridEventsWrapper(props: DataGridWrapperProps) {
|
|
|
315
311
|
/>
|
|
316
312
|
);
|
|
317
313
|
},
|
|
318
|
-
[props.contextMenuItems]
|
|
314
|
+
[props.contextMenuItems, menuAnchorEl, update_menuAnchorEl]
|
|
319
315
|
);
|
|
320
|
-
const update_menuAnchorEl = React.useCallback((el) => {
|
|
321
|
-
set_menuAnchorEl(el || null);
|
|
322
|
-
}, []);
|
|
323
|
-
|
|
324
316
|
/**
|
|
325
317
|
* Merge click events into grid options
|
|
326
318
|
*/
|