@azrico/reactgrid 1.2.38 → 1.2.40
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 +9 -9
- package/package.json +1 -1
- package/src/views/DataGrid.tsx +7 -7
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.40](https://github.com/Azrideus/azrico-reactgrid/compare/v1.2.10...v1.2.40) (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.39](https://github.com/Azrideus/azrico-reactgrid/compare/v1.2.10...v1.2.39) (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.38](https://github.com/Azrideus/azrico-reactgrid/compare/v1.2.10...v1.2.38) (2023-07-09)
|
|
6
34
|
|
|
7
35
|
|
|
@@ -12,6 +12,7 @@ require("../themes/base_styles.css");
|
|
|
12
12
|
require("../themes/grid.css");
|
|
13
13
|
var _func_grid = require("../func/func_grid");
|
|
14
14
|
var _react = _interopRequireDefault(require("react"));
|
|
15
|
+
var _func_child = require("../func/func_child");
|
|
15
16
|
var _reactdatagridEnterprise = _interopRequireDefault(require("@inovua/reactdatagrid-enterprise"));
|
|
16
17
|
var _clsx = _interopRequireDefault(require("clsx"));
|
|
17
18
|
var _reactUseSize = require("react-use-size");
|
|
@@ -131,17 +132,17 @@ function DataGridEventsWrapper(props) {
|
|
|
131
132
|
click_data.current = {};
|
|
132
133
|
}, [props.dataSource]);
|
|
133
134
|
/* ------------------------------- ContextMenu ------------------------------ */
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
135
|
+
const onRowContextMenu = _react.default.useCallback((rowProps, event) => {
|
|
136
|
+
if (!rowProps || !rowProps.data || _func_child.func_selection.has_selection()) return;
|
|
137
|
+
const anEl = _func_child.func_selection.getVirtualElement(event.clientX, event.clientY);
|
|
138
|
+
update_menuAnchorEl(anEl);
|
|
139
|
+
}, []);
|
|
139
140
|
const renderRowContextMenu = _react.default.useCallback((menuProps, rowProps) => {
|
|
140
141
|
menuProps.autoDismiss = true;
|
|
141
142
|
menuProps.items = [{
|
|
142
143
|
label: 'Row ' + rowProps.rowIndex
|
|
143
144
|
}, {
|
|
144
|
-
label: 'Want to visit '
|
|
145
|
+
label: 'Want to visit '
|
|
145
146
|
}];
|
|
146
147
|
// return (
|
|
147
148
|
// <ContextMenu
|
|
@@ -160,10 +161,9 @@ function DataGridEventsWrapper(props) {
|
|
|
160
161
|
*/
|
|
161
162
|
const static_gridOptions = _react.default.useMemo(() => {
|
|
162
163
|
const events = {
|
|
163
|
-
onRowClick: onRowClick
|
|
164
|
-
|
|
164
|
+
onRowClick: onRowClick,
|
|
165
|
+
onRowContextMenu: onRowContextMenu
|
|
165
166
|
};
|
|
166
|
-
|
|
167
167
|
const contextmenuProps = {
|
|
168
168
|
renderRowContextMenu: renderRowContextMenu
|
|
169
169
|
};
|
package/package.json
CHANGED
package/src/views/DataGrid.tsx
CHANGED
|
@@ -288,11 +288,11 @@ function DataGridEventsWrapper(props: DataGridWrapperProps) {
|
|
|
288
288
|
}, [props.dataSource]);
|
|
289
289
|
|
|
290
290
|
/* ------------------------------- ContextMenu ------------------------------ */
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
291
|
+
const onRowContextMenu = React.useCallback((rowProps, event) => {
|
|
292
|
+
if (!rowProps || !rowProps.data || func_selection.has_selection()) return;
|
|
293
|
+
const anEl = func_selection.getVirtualElement(event.clientX, event.clientY);
|
|
294
|
+
update_menuAnchorEl(anEl);
|
|
295
|
+
}, []);
|
|
296
296
|
const renderRowContextMenu = React.useCallback(
|
|
297
297
|
(menuProps, rowProps) => {
|
|
298
298
|
menuProps.autoDismiss = true;
|
|
@@ -301,7 +301,7 @@ function DataGridEventsWrapper(props: DataGridWrapperProps) {
|
|
|
301
301
|
label: 'Row ' + rowProps.rowIndex,
|
|
302
302
|
},
|
|
303
303
|
{
|
|
304
|
-
label: 'Want to visit '
|
|
304
|
+
label: 'Want to visit ',
|
|
305
305
|
},
|
|
306
306
|
];
|
|
307
307
|
// return (
|
|
@@ -325,7 +325,7 @@ function DataGridEventsWrapper(props: DataGridWrapperProps) {
|
|
|
325
325
|
const static_gridOptions = React.useMemo<AzGridOptions>(() => {
|
|
326
326
|
const events: AzGridOptions = {
|
|
327
327
|
onRowClick: onRowClick,
|
|
328
|
-
|
|
328
|
+
onRowContextMenu: onRowContextMenu,
|
|
329
329
|
};
|
|
330
330
|
const contextmenuProps: AzGridOptions = {
|
|
331
331
|
renderRowContextMenu: renderRowContextMenu,
|