mirror of
https://github.com/apache/superset.git
synced 2024-09-06 22:07:34 -04:00
fix(alerts/reports): misconfigured useEffect hook breaks form validation in prod builds (#12779)
This commit is contained in:
parent
017f11f9d8
commit
3ed915146d
@ -992,27 +992,23 @@ const AlertReportModal: FunctionComponent<AlertReportModalProps> = ({
|
|||||||
}, [resource]);
|
}, [resource]);
|
||||||
|
|
||||||
// Validation
|
// Validation
|
||||||
useEffect(
|
const currentAlertSafe = currentAlert || {};
|
||||||
() => {
|
useEffect(() => {
|
||||||
validate();
|
validate();
|
||||||
},
|
}, [
|
||||||
currentAlert
|
currentAlertSafe.name,
|
||||||
? [
|
currentAlertSafe.owners,
|
||||||
currentAlert.name,
|
currentAlertSafe.database,
|
||||||
currentAlert.owners,
|
currentAlertSafe.sql,
|
||||||
currentAlert.database,
|
currentAlertSafe.validator_config_json,
|
||||||
currentAlert.sql,
|
currentAlertSafe.crontab,
|
||||||
currentAlert.validator_config_json,
|
currentAlertSafe.working_timeout,
|
||||||
currentAlert.crontab,
|
currentAlertSafe.dashboard,
|
||||||
currentAlert.working_timeout,
|
currentAlertSafe.chart,
|
||||||
currentAlert.dashboard,
|
contentType,
|
||||||
currentAlert.chart,
|
notificationSettings,
|
||||||
contentType,
|
conditionNotNull,
|
||||||
notificationSettings,
|
]);
|
||||||
conditionNotNull,
|
|
||||||
]
|
|
||||||
: [],
|
|
||||||
);
|
|
||||||
|
|
||||||
// Show/hide
|
// Show/hide
|
||||||
if (isHidden && show) {
|
if (isHidden && show) {
|
||||||
|
Loading…
Reference in New Issue
Block a user