@azrico/reactgrid 1.2.41 → 1.2.43
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 +1 -1
- 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.43](https://github.com/Azrideus/azrico-reactgrid/compare/v1.2.10...v1.2.43) (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.42](https://github.com/Azrideus/azrico-reactgrid/compare/v1.2.10...v1.2.42) (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.41](https://github.com/Azrideus/azrico-reactgrid/compare/v1.2.10...v1.2.41) (2023-07-09)
|
|
6
34
|
|
|
7
35
|
|
|
@@ -138,29 +138,20 @@ function DataGridEventsWrapper(props) {
|
|
|
138
138
|
const anEl = _func_child.func_selection.getVirtualElement(event.clientX, event.clientY);
|
|
139
139
|
update_menuAnchorEl(anEl);
|
|
140
140
|
}, []);
|
|
141
|
+
const update_menuAnchorEl = _react.default.useCallback(el => {
|
|
142
|
+
set_menuAnchorEl(el || null);
|
|
143
|
+
}, []);
|
|
141
144
|
const renderRowContextMenu = _react.default.useCallback((menuProps, {
|
|
142
145
|
rowProps
|
|
143
146
|
}) => {
|
|
144
|
-
console.log('cm:',
|
|
145
|
-
// menuProps.autoDismiss = true;
|
|
146
|
-
// menuProps.items = [
|
|
147
|
-
// {
|
|
148
|
-
// label: 'Row ' + rowProps.rowIndex,
|
|
149
|
-
// },
|
|
150
|
-
// {
|
|
151
|
-
// label: 'Want to visit ',
|
|
152
|
-
// },
|
|
153
|
-
// ];
|
|
147
|
+
console.log('cm:', menuAnchorEl);
|
|
154
148
|
return _react.default.createElement(_controls.ContextMenu, {
|
|
155
149
|
menuAnchorEl: menuAnchorEl,
|
|
156
150
|
set_menuAnchorEl: update_menuAnchorEl,
|
|
157
151
|
menuRow: rowProps.data,
|
|
158
152
|
menu_items: props.contextMenuItems
|
|
159
153
|
});
|
|
160
|
-
}, [props.contextMenuItems]);
|
|
161
|
-
const update_menuAnchorEl = _react.default.useCallback(el => {
|
|
162
|
-
set_menuAnchorEl(el || null);
|
|
163
|
-
}, []);
|
|
154
|
+
}, [props.contextMenuItems, menuAnchorEl, update_menuAnchorEl]);
|
|
164
155
|
/**
|
|
165
156
|
* Merge click events into grid options
|
|
166
157
|
*/
|
package/package.json
CHANGED
package/src/views/DataGrid.tsx
CHANGED
|
@@ -293,18 +293,14 @@ function DataGridEventsWrapper(props: DataGridWrapperProps) {
|
|
|
293
293
|
const anEl = func_selection.getVirtualElement(event.clientX, event.clientY);
|
|
294
294
|
update_menuAnchorEl(anEl);
|
|
295
295
|
}, []);
|
|
296
|
+
|
|
297
|
+
const update_menuAnchorEl = React.useCallback((el) => {
|
|
298
|
+
set_menuAnchorEl(el || null);
|
|
299
|
+
}, []);
|
|
300
|
+
|
|
296
301
|
const renderRowContextMenu = React.useCallback(
|
|
297
302
|
(menuProps, { rowProps }) => {
|
|
298
|
-
console.log('cm:',
|
|
299
|
-
// menuProps.autoDismiss = true;
|
|
300
|
-
// menuProps.items = [
|
|
301
|
-
// {
|
|
302
|
-
// label: 'Row ' + rowProps.rowIndex,
|
|
303
|
-
// },
|
|
304
|
-
// {
|
|
305
|
-
// label: 'Want to visit ',
|
|
306
|
-
// },
|
|
307
|
-
// ];
|
|
303
|
+
console.log('cm:', menuAnchorEl);
|
|
308
304
|
return (
|
|
309
305
|
<ContextMenu
|
|
310
306
|
menuAnchorEl={menuAnchorEl}
|
|
@@ -314,12 +310,8 @@ function DataGridEventsWrapper(props: DataGridWrapperProps) {
|
|
|
314
310
|
/>
|
|
315
311
|
);
|
|
316
312
|
},
|
|
317
|
-
[props.contextMenuItems]
|
|
313
|
+
[props.contextMenuItems, menuAnchorEl, update_menuAnchorEl]
|
|
318
314
|
);
|
|
319
|
-
const update_menuAnchorEl = React.useCallback((el) => {
|
|
320
|
-
set_menuAnchorEl(el || null);
|
|
321
|
-
}, []);
|
|
322
|
-
|
|
323
315
|
/**
|
|
324
316
|
* Merge click events into grid options
|
|
325
317
|
*/
|