youngyjd commented on a change in pull request #5767: Fix multilayer geoviz and
color picker error
URL:
https://github.com/apache/incubator-superset/pull/5767#discussion_r213849656
##########
File path:
superset/assets/src/visualizations/deckgl/CategoricalDeckGLContainer.jsx
##########
@@ -80,7 +80,7 @@ export default class CategoricalDeckGLContainer extends
React.PureComponent {
}
getLayers(values) {
const fd = this.props.slice.formData;
- let data = [...this.props.data];
+ let data = [...this.props.payload.data.features];
Review comment:
Did some test and found it does not work. I guess it is because the location
that `data` references got changed so `payload.data.features` will not get
updated.
This is part of the code:
```
let data = [...this.props.payload.data.features];
// Add colors from categories or fixed color
data = this.addColor(data, fd);
```
If we change it to `let data = this.props.payload.data.features;` and then
`data` get reassigned by `data = this.addColor(data, fd);`, it is not
referencing to the location of `this.props.payload.data.features` anymore so
`this.props.payload.data.features` will not be changed.
----------------------------------------------------------------
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]