@natoora-libs/core 0.1.16-dev-doug-5 → 0.1.16-dev-doug-6
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/components/index.js
CHANGED
|
@@ -7822,7 +7822,8 @@ var TableDesktopNumericField = ({
|
|
|
7822
7822
|
}) => {
|
|
7823
7823
|
const [input, setInput] = useState18(initialValue);
|
|
7824
7824
|
const commitValue = (value) => {
|
|
7825
|
-
|
|
7825
|
+
const isDirty = value !== initialValue;
|
|
7826
|
+
if (!onUpdateEditableCell || !isDirty) {
|
|
7826
7827
|
return;
|
|
7827
7828
|
}
|
|
7828
7829
|
onUpdateEditableCell(rowId ?? 0, field, value, value);
|
|
@@ -7950,7 +7951,8 @@ var TableDesktopTextField = ({
|
|
|
7950
7951
|
const [input, setInput] = useState20(initialValue);
|
|
7951
7952
|
const hasValidationError = useMemo4(() => !validateInput?.(input), [input, validateInput]);
|
|
7952
7953
|
const commitValue = (value) => {
|
|
7953
|
-
|
|
7954
|
+
const isDirty = value !== initialValue;
|
|
7955
|
+
if (hasValidationError || !onUpdateEditableCell || !isDirty) {
|
|
7954
7956
|
return;
|
|
7955
7957
|
}
|
|
7956
7958
|
onUpdateEditableCell(rowId ?? 0, field, value, value);
|
|
@@ -8047,7 +8049,7 @@ var TableDesktopEditableComponent = ({
|
|
|
8047
8049
|
variant,
|
|
8048
8050
|
size,
|
|
8049
8051
|
field,
|
|
8050
|
-
initialValue: editInitialValue,
|
|
8052
|
+
initialValue: editInitialValue ?? "",
|
|
8051
8053
|
inputLabel: inputLabel ?? "",
|
|
8052
8054
|
validateInput,
|
|
8053
8055
|
onUpdateEditableCell
|
|
@@ -8061,7 +8063,7 @@ var TableDesktopEditableComponent = ({
|
|
|
8061
8063
|
variant,
|
|
8062
8064
|
size,
|
|
8063
8065
|
field,
|
|
8064
|
-
initialValue: editInitialValue,
|
|
8066
|
+
initialValue: editInitialValue ?? "",
|
|
8065
8067
|
inputLabel: inputLabel ?? "",
|
|
8066
8068
|
onUpdateEditableCell
|
|
8067
8069
|
}
|