@economic/taco 2.70.1 → 2.70.2-release-reverts.0
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/dist/taco.cjs +3 -8
- package/dist/taco.cjs.map +1 -1
- package/dist/taco.js +3 -8
- package/dist/taco.js.map +1 -1
- package/package.json +2 -2
package/dist/taco.cjs
CHANGED
@@ -55960,17 +55960,10 @@ function EditingControlCell(props) {
|
|
55960
55960
|
const handleFocus = useEditingCellAutofocus(props);
|
55961
55961
|
const value = cell.getValue();
|
55962
55962
|
const rowChanges = tableMeta.editing.getRowValue(cell.row.id);
|
55963
|
-
const shouldRunUpdate = React.useRef(false);
|
55964
55963
|
const hasNonTextControl = React.useMemo(() => {
|
55965
55964
|
var _a;
|
55966
55965
|
return typeof type === "function" && !!((_a = cellRef.current) == null ? void 0 : _a.querySelector('[data-taco="Select2"],[data-taco="switch"],[data-taco="checkbox"]'));
|
55967
55966
|
}, [cellRef.current]);
|
55968
|
-
useLazyEffect(() => {
|
55969
|
-
if (hasNonTextControl && shouldRunUpdate.current) {
|
55970
|
-
tableMeta.editing.onCellChanged(cell, rowIndex, value, true, false);
|
55971
|
-
shouldRunUpdate.current = false;
|
55972
|
-
}
|
55973
|
-
}, [value]);
|
55974
55967
|
const handleChange = React.useCallback(
|
55975
55968
|
(nextValue) => {
|
55976
55969
|
let hasChanged = false;
|
@@ -55987,7 +55980,9 @@ function EditingControlCell(props) {
|
|
55987
55980
|
}
|
55988
55981
|
if (hasChanged) {
|
55989
55982
|
tableMeta.editing.setCellValue(cell, rowIndex, nextValue);
|
55990
|
-
|
55983
|
+
if (hasNonTextControl) {
|
55984
|
+
requestAnimationFrame(() => tableMeta.editing.onCellChanged(cell, rowIndex, nextValue, true, false));
|
55985
|
+
}
|
55991
55986
|
}
|
55992
55987
|
},
|
55993
55988
|
[hasNonTextControl, cell.row.id, cell.column.id, cell.row.original, rowIndex, value, columnMeta.dataType]
|