@cloudtower/eagle 0.27.15 → 0.27.16
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.css +1411 -1411
- package/dist/esm/index.js +8 -8
- package/dist/esm/stats1.html +1 -1
- package/dist/style.css +1420 -1420
- package/dist/umd/index.js +8 -8
- package/dist/umd/stats1.html +1 -1
- package/package.json +5 -5
package/dist/esm/index.js
CHANGED
|
@@ -6666,18 +6666,18 @@ const TableFormBodyCell = (props) => {
|
|
|
6666
6666
|
error
|
|
6667
6667
|
} = props;
|
|
6668
6668
|
const [validateResult, setValidateResult] = useState();
|
|
6669
|
-
const isTouched =
|
|
6669
|
+
const [isTouched, setIsTouched] = useState(false);
|
|
6670
6670
|
const width = typeof column.width === "number" ? column.width + "px" : column.width;
|
|
6671
6671
|
const isCellErrorStyle = Boolean((validateResult == null ? void 0 : validateResult.isError) || isRowError);
|
|
6672
6672
|
useEffect(() => {
|
|
6673
|
-
if (isTouched
|
|
6673
|
+
if (isTouched)
|
|
6674
6674
|
setValidateResult(
|
|
6675
6675
|
error ? {
|
|
6676
6676
|
msg: error,
|
|
6677
6677
|
isError: true
|
|
6678
6678
|
} : void 0
|
|
6679
6679
|
);
|
|
6680
|
-
}, [error]);
|
|
6680
|
+
}, [error, isTouched]);
|
|
6681
6681
|
const triggerValidate = useCallback(
|
|
6682
6682
|
(currentValue) => {
|
|
6683
6683
|
var _a;
|
|
@@ -6702,24 +6702,24 @@ const TableFormBodyCell = (props) => {
|
|
|
6702
6702
|
);
|
|
6703
6703
|
useEffect(() => {
|
|
6704
6704
|
if (validateAll) {
|
|
6705
|
-
|
|
6705
|
+
setIsTouched(true);
|
|
6706
6706
|
triggerValidate();
|
|
6707
6707
|
}
|
|
6708
|
-
}, [validateAll, triggerValidate]);
|
|
6708
|
+
}, [validateAll, triggerValidate, setIsTouched]);
|
|
6709
6709
|
const _onChange = (value, data2) => {
|
|
6710
6710
|
const newData = data2.map(
|
|
6711
6711
|
(row, i) => i === rowIndex ? __spreadProps$7(__spreadValues$7({}, row), { [column.key]: value }) : row
|
|
6712
6712
|
);
|
|
6713
6713
|
onChange == null ? void 0 : onChange(newData, rowIndex, column.key);
|
|
6714
|
-
if (validateTriggerType === ValidateTriggerType.Normal && isTouched
|
|
6714
|
+
if (validateTriggerType === ValidateTriggerType.Normal && isTouched || validateTriggerType === ValidateTriggerType.Aggressive) {
|
|
6715
6715
|
triggerValidate(value);
|
|
6716
6716
|
}
|
|
6717
6717
|
};
|
|
6718
6718
|
const _onBlur = useCallback(() => {
|
|
6719
|
-
|
|
6719
|
+
setIsTouched(true);
|
|
6720
6720
|
triggerValidate();
|
|
6721
6721
|
onBlur == null ? void 0 : onBlur(data, rowIndex, column.key);
|
|
6722
|
-
}, [rowIndex, column, onBlur, data, triggerValidate]);
|
|
6722
|
+
}, [rowIndex, column, onBlur, data, triggerValidate, setIsTouched]);
|
|
6723
6723
|
const renderDefaultComponent = () => {
|
|
6724
6724
|
if (!column.type)
|
|
6725
6725
|
return null;
|