williaster commented on a change in pull request #5891: [bugfix] Fix color
scheme picker
URL:
https://github.com/apache/incubator-superset/pull/5891#discussion_r218260753
##########
File path:
superset/assets/src/explore/components/controls/ColorSchemeControl.jsx
##########
@@ -41,9 +47,9 @@ export default class ColorSchemeControl extends
React.PureComponent {
}
renderOption(key) {
- const currentScheme = key.value ?
- this.props.schemes[key.value] :
- this.props.schemes[defaultProps.value];
+ const { schemes } = this.props;
+ const schemeLookup = _.isFunction(schemes) ? schemes() : schemes;
+ const currentScheme = schemeLookup[key.value || defaultProps];
Review comment:
should this be `defaultProps.value`?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]