eschutho commented on code in PR #26327:
URL: https://github.com/apache/superset/pull/26327#discussion_r1460104000
##########
superset-frontend/src/features/alerts/AlertReportModal.tsx:
##########
@@ -888,6 +890,10 @@ const AlertReportModal:
FunctionComponent<AlertReportModalProps> = ({
const parsedValue = type === 'number' ? parseInt(value, 10) || null :
value;
updateAlertState(name, parsedValue);
+
+ if (name === 'name') {
+ updateEmailSubject();
+ }
Review Comment:
Right, the pattern that the other fields are using, just to be consistent,
is something like this:
````
const onSubjectChange = (value: string) => {
updateAlertState('email_subject', value);
};
```
That will add the subject key/val into `currentAlert`. I don't think you
need to have both emailSubject and currentAlert.email_subject.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]