msyavuz commented on code in PR #33971:
URL: https://github.com/apache/superset/pull/33971#discussion_r2180561956
##########
superset-frontend/src/dashboard/components/CssEditor/index.tsx:
##########
@@ -103,8 +103,13 @@ class CssEditor extends PureComponent<CssEditorProps,
CssEditorState> {
}
changeCssTemplate(info: { key: Key }) {
- const keyAsString = String(info.key);
- this.changeCss(keyAsString);
+ const templateName = String(info.key);
+ const selectedTemplate = this.state.templates?.find(
+ template => template.label === templateName,
+ );
Review Comment:
```suggestion
const selectedTemplate = this.state.templates?.find(
template => template.label === info.key,
);
```
--
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]