You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2020/07/09 01:03:24 UTC

[GitHub] [incubator-superset] kristw commented on a change in pull request #10264: fix: optimize mapStateToProps for chart controls

kristw commented on a change in pull request #10264:
URL: https://github.com/apache/incubator-superset/pull/10264#discussion_r451905644



##########
File path: superset-frontend/src/explore/controlUtils.js
##########
@@ -88,15 +88,17 @@ export const getControlConfig = memoizeOne(function getControlConfig(
   return control?.config || control;
 });
 
-export function applyMapStateToPropsToControl(control, state) {
-  if (control.mapStateToProps) {
-    const appliedControl = { ...control };
-    if (state) {
-      Object.assign(appliedControl, control.mapStateToProps(state, control));
-    }
-    return appliedControl;
+/**
+ * Call `mapStateToProps` from controlState and update it in place.

Review comment:
       +1




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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org