kgabryje commented on code in PR #21685:
URL: https://github.com/apache/superset/pull/21685#discussion_r989325861


##########
superset-frontend/src/dashboard/actions/hydrate.js:
##########
@@ -291,8 +292,26 @@ export const hydrateDashboard =
       future: [],
     };
 
+    // Searches for a focused_chart parameter in the URL to automatically 
focus a chart
+    const { focused_chart: focusedChartId } = regularUrlParams;
+    let focusedChartLayoutId;
+    if (focusedChartId) {
+      // Converts focused_chart to dashboard layout id
+      const found = Object.values(dashboardLayout.present).find(
+        // eslint-disable-next-line eqeqeq

Review Comment:
   Why do we need to use `==`? Are meta.chartId and focusedChartId different 
types? In that case we could try casting to number. Alternatively we could add 
focused_chart to URL_PARAMS as number type and retrieve it with getUrlParam - 
it would be cast to number automatically 



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