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_r213833883
 
 

 ##########
 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:
   Here you're making a copy of `this.props.payload.data.features`, mutating 
it, and then assigning it back to `payload` in line 107. Here you can simply do:
   
   ```javascript
   let data = this.props.payload.data.features;
   ```
   
   And then as you mutate it, `payload.data.features` is also mutated. This way 
you can simply pass the original payload to `getLayer`.

----------------------------------------------------------------
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]

Reply via email to