eschutho commented on a change in pull request #17176:
URL: https://github.com/apache/superset/pull/17176#discussion_r737918678
##########
File path: superset-frontend/src/views/CRUD/alert/AlertReportModal.tsx
##########
@@ -1136,7 +1136,8 @@ const AlertReportModal:
FunctionComponent<AlertReportModalProps> = ({
maxLines={15}
onChange={onSQLChange}
readOnly={false}
- value={currentAlert ? currentAlert.sql : ''}
+ defaultValue={currentAlert?.sql}
Review comment:
I think you want to pass in the resource.sql here. Otherwise you're
passing in the latest state and not just the api response. This is likely why
the TextArea component is continuing to update, too.
Also small nit, looking at this again, I would recommend calling this
`initialValue` instead of `defaultValue`; It's not a default, because it's not
static and not a fallback if data isn't given, if that makes sense.
--
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]