michael-s-molina commented on code in PR #20965:
URL: https://github.com/apache/superset/pull/20965#discussion_r938739591


##########
superset-frontend/src/explore/actions/hydrateExplore.ts:
##########
@@ -119,7 +120,7 @@ export const hydrateExplore =
       controls: initialControls,
       form_data: initialFormData,
       slice: initialSlice,
-      controlsTransferred: [],
+      controlsTransferred: explore.controlsTransferred,

Review Comment:
   Yes. The `hydrateExplore` is the action responsible for mounting the Explore 
state so it shouldn't have a reference to itself. It will only work because 
there's a known problem where the save action is firing `hydrateExplore` again 
but it shouldn't. We're calling `hydrateExplore` on save intentionally because 
during the SPA work we wanted to avoid reloading the page but many of the 
existing logic depended on that. It would require a major refactor to change 
this behavior. Currently, `explore.controlsTransferred` is being updated by 
`UPDATE_FORM_DATA_BY_DATASOURCE` action. You'll probably won't need all the 
logic inside that action, so I suggest creating a new action to update this 
piece of state and call this new action from your code.
   
   Ping me or @kgabryje if you need more assistance on this.



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

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to