@azrico/reactgrid 1.2.39 → 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 +14 -0
- package/dist/src/views/DataGrid.js +8 -8
- package/package.json +1 -1
- package/src/views/DataGrid.tsx +6 -6
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,20 @@
|
|
|
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
|
+
|
|
5
19
|
### [1.2.39](https://github.com/Azrideus/azrico-reactgrid/compare/v1.2.10...v1.2.39) (2023-07-09)
|
|
6
20
|
|
|
7
21
|
|
|
@@ -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,11 +132,11 @@ 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 = [{
|
|
@@ -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;
|
|
@@ -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,
|