villebro commented on code in PR #20107:
URL: https://github.com/apache/superset/pull/20107#discussion_r875699857


##########
superset-frontend/src/explore/store.js:
##########
@@ -64,8 +64,14 @@ export function getControlsState(state, inputFormData) {
 export function applyDefaultFormData(inputFormData) {
   const datasourceType = inputFormData.datasource.split('__')[1];
   const vizType = inputFormData.viz_type;
-  const controlsState = getAllControlsState(vizType, datasourceType, null, {
-    ...inputFormData,
+  let controlsState = getAllControlsState(vizType, datasourceType, {
+    form_data: inputFormData,
+  });

Review Comment:
   Here I'm removing the shallow copy of `inputFormData` and placing it in the 
`Partial<ControlPanelState>` object, as I didn't see any downstream code 
mutating the object.



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