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 2021/09/14 11:20:29 UTC

[GitHub] [superset] villebro commented on a change in pull request #16699: fix(explore): only refresh data panel on relevant changes

villebro commented on a change in pull request #16699:
URL: https://github.com/apache/superset/pull/16699#discussion_r708167914



##########
File path: superset-frontend/src/explore/components/ExploreChartPanel.jsx
##########
@@ -257,6 +258,16 @@ const ExploreChartPanel = props => {
     [chartPanelRef, renderChart],
   );
 
+  const [queryFormData, setQueryFormData] = useState(
+    props.chart.latestQueryFormData,
+  );
+
+  useEffect(() => {
+    if (!props.triggerRender) {
+      setQueryFormData(props.chart.latestQueryFormData);
+    }
+  }, [props.chart.latestQueryFormData]);

Review comment:
       No - that would cause it to trigger when we change controls whose `renderTrigger` prop is set to `true`.




-- 
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-unsubscribe@superset.apache.org

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