ag-common 0.0.229 → 0.0.230

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.
@@ -106,12 +106,12 @@ const TextEdit = ({ defaultValue = '', defaultEditing, disableEdit = false, plac
106
106
  setEditingRaw(false);
107
107
  }
108
108
  });
109
- const setEditing = (b) => {
109
+ const setEditing = (0, react_1.useCallback)((b) => {
110
110
  setEditingRaw(b);
111
111
  if (onEditingChange) {
112
112
  onEditingChange(b);
113
113
  }
114
- };
114
+ }, [onEditingChange]);
115
115
  (0, react_1.useEffect)(() => {
116
116
  setValue(defaultValue);
117
117
  // eslint-disable-next-line react-hooks/exhaustive-deps
@@ -120,9 +120,8 @@ const TextEdit = ({ defaultValue = '', defaultEditing, disableEdit = false, plac
120
120
  if ((defaultEditing === null || defaultEditing === void 0 ? void 0 : defaultEditing.focus) && taref.current) {
121
121
  taref.current.focus();
122
122
  }
123
- setEditing(!!defaultEditing);
124
123
  // eslint-disable-next-line react-hooks/exhaustive-deps
125
- }, [defaultEditing]);
124
+ }, []);
126
125
  if (!editing || disableEdit) {
127
126
  return (react_1.default.createElement(common_1.ValueBox, Object.assign({}, common_2.noDrag, { className: className, "data-editing": "false", onClick: () => onClickNotEditing === null || onClickNotEditing === void 0 ? void 0 : onClickNotEditing(), "data-pointer": onClickNotEditing ? 'true' : 'false', "data-nogrow": noGrow }, attributes),
128
127
  leftContent || null,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ag-common",
3
- "version": "0.0.229",
3
+ "version": "0.0.230",
4
4
  "main": "./dist/index.js",
5
5
  "types": "./dist/index.d.ts",
6
6
  "author": "Andrei Gec <@andreigec> (https://gec.dev/)",