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


##########
superset-frontend/src/dashboard/components/DashboardBuilder/DashboardContainer.tsx:
##########
@@ -85,9 +86,17 @@ const DashboardContainer: FC<DashboardContainerProps> = ({ 
topLevelTabs }) => {
   const directPathToChild = useSelector<RootState, string[]>(
     state => state.dashboardState.directPathToChild,
   );
-  const chartIds = useSelector<RootState, number[]>(state =>
-    Object.values(state.charts).map(chart => chart.id),
+  const isEditMode = useSelector<RootState, boolean>(
+    state => state.dashboardState.editMode,
   );
+  const charts = useSelector<RootState, Chart[]>(state =>

Review Comment:
   It could probably be further optimised, so that we don't repeat some 
operations, but the general idea is to return values/objects from useSelector 
that change scarcely



-- 
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: notifications-unsubscr...@superset.apache.org

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


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

Reply via email to