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



##########
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:
       Actually, this causes a rerender when making changes to controls that 
don't have `renderTrigger` set to `true` (a rerendering should only trigger 
after running the query):
   
https://user-images.githubusercontent.com/33317356/133249851-49e9ceb3-0865-4172-b915-0c2c2b0c5bdc.mp4
   
   




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