@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.js
CHANGED
@@ -55942,17 +55942,10 @@ function EditingControlCell(props) {
|
|
55942
55942
|
const handleFocus = useEditingCellAutofocus(props);
|
55943
55943
|
const value = cell.getValue();
|
55944
55944
|
const rowChanges = tableMeta.editing.getRowValue(cell.row.id);
|
55945
|
-
const shouldRunUpdate = React__default.useRef(false);
|
55946
55945
|
const hasNonTextControl = React__default.useMemo(() => {
|
55947
55946
|
var _a;
|
55948
55947
|
return typeof type === "function" && !!((_a = cellRef.current) == null ? void 0 : _a.querySelector('[data-taco="Select2"],[data-taco="switch"],[data-taco="checkbox"]'));
|
55949
55948
|
}, [cellRef.current]);
|
55950
|
-
useLazyEffect(() => {
|
55951
|
-
if (hasNonTextControl && shouldRunUpdate.current) {
|
55952
|
-
tableMeta.editing.onCellChanged(cell, rowIndex, value, true, false);
|
55953
|
-
shouldRunUpdate.current = false;
|
55954
|
-
}
|
55955
|
-
}, [value]);
|
55956
55949
|
const handleChange = React__default.useCallback(
|
55957
55950
|
(nextValue) => {
|
55958
55951
|
let hasChanged = false;
|
@@ -55969,7 +55962,9 @@ function EditingControlCell(props) {
|
|
55969
55962
|
}
|
55970
55963
|
if (hasChanged) {
|
55971
55964
|
tableMeta.editing.setCellValue(cell, rowIndex, nextValue);
|
55972
|
-
|
55965
|
+
if (hasNonTextControl) {
|
55966
|
+
requestAnimationFrame(() => tableMeta.editing.onCellChanged(cell, rowIndex, nextValue, true, false));
|
55967
|
+
}
|
55973
55968
|
}
|
55974
55969
|
},
|
55975
55970
|
[hasNonTextControl, cell.row.id, cell.column.id, cell.row.original, rowIndex, value, columnMeta.dataType]
|