etr2460 commented on a change in pull request #12873:
URL: https://github.com/apache/superset/pull/12873#discussion_r568296685
##########
File path: superset-frontend/src/SqlLab/components/TemplateParamsEditor.jsx
##########
@@ -68,23 +60,27 @@ export default class TemplateParamsEditor extends
React.Component {
} catch (e) {
isValid = false;
}
- this.setState({ parsedJSON, isValid, codeText });
+ setState({ parsedJSON, isValid, codeText });
const newValue = isValid ? codeText : '{}';
- if (newValue !== this.props.code) {
- this.props.onChange(newValue);
+ if (newValue !== code) {
+ onChange(newValue);
}
- }
+ };
+
+ useEffect(() => {
+ onChange(codeText);
+ }, [codeText]);
- renderDoc() {
- return (
+ const modalBody = (
+ <div>
<p>
- {t('Assign a set of parameters as')}
+ 'Assign a set of parameters as'
Review comment:
lol, this was a typo, i meant to say "make sure the _text_ renders
properly"
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]