betodealmeida 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_r213834895
##########
File path:
superset/assets/src/visualizations/deckgl/CategoricalDeckGLContainer.jsx
##########
@@ -103,7 +103,9 @@ export default class CategoricalDeckGLContainer extends
React.PureComponent {
data = data.filter(d => this.state.categories[d.cat_color].enabled);
}
- return [this.props.getLayer(fd, data, this.props.slice)];
+ const payload = this.props.payload;
+ payload.data.features = data;
+ return [this.props.getLayer(fd, payload, this.props.slice)];
Review comment:
This can simply be written as:
```javascript
return [this.props.getLayer(fd, this.props.payload, this.props.slice)];
```
If you follow my comment above. You can also do in the beginning of the
function:
```javascript
const { getLayer, payload, slice } = this.props;
```
The you can simple refer to `getLayer`, `payload` and `slice` inside the
function, instead of `this.props.getLayer`, `this.props.payload` and
`this.props.slice`.
----------------------------------------------------------------
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]