@azrico/reactgrid 1.2.42 → 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 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.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
+
5
19
  ### [1.2.42](https://github.com/Azrideus/azrico-reactgrid/compare/v1.2.10...v1.2.42) (2023-07-09)
6
20
 
7
21
 
@@ -136,32 +136,22 @@ 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, {
156
149
  menuAnchorEl: menuAnchorEl,
157
150
  set_menuAnchorEl: update_menuAnchorEl,
158
151
  menuRow: rowProps.data,
159
152
  menu_items: props.contextMenuItems
160
153
  });
161
- }, [props.contextMenuItems]);
162
- const update_menuAnchorEl = _react.default.useCallback(el => {
163
- set_menuAnchorEl(el || null);
164
- }, []);
154
+ }, [props.contextMenuItems, menuAnchorEl, update_menuAnchorEl]);
165
155
  /**
166
156
  * Merge click events into grid options
167
157
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@azrico/reactgrid",
3
- "version": "1.2.42",
3
+ "version": "1.2.43",
4
4
  "main": "dist/index.js",
5
5
  "description": "React Datagrid",
6
6
  "author": "Azrideus <MehrdadTavangar@gmail.com>",
@@ -291,21 +291,16 @@ 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
311
306
  menuAnchorEl={menuAnchorEl}
@@ -315,12 +310,8 @@ function DataGridEventsWrapper(props: DataGridWrapperProps) {
315
310
  />
316
311
  );
317
312
  },
318
- [props.contextMenuItems]
313
+ [props.contextMenuItems, menuAnchorEl, update_menuAnchorEl]
319
314
  );
320
- const update_menuAnchorEl = React.useCallback((el) => {
321
- set_menuAnchorEl(el || null);
322
- }, []);
323
-
324
315
  /**
325
316
  * Merge click events into grid options
326
317
  */