mirror of
https://github.com/apache/superset.git
synced 2026-04-21 00:54:44 +00:00
Fix running query on every change in chart controls (#12361)
This commit is contained in:
committed by
GitHub
parent
7c8ead85c1
commit
1d2789944c
@@ -265,7 +265,6 @@ function ExploreViewContainer(props) {
|
||||
}
|
||||
}, [isDynamicPluginLoading]);
|
||||
|
||||
// effect to run when controls change
|
||||
useEffect(() => {
|
||||
const hasError = Object.values(props.controls).some(
|
||||
control =>
|
||||
@@ -274,7 +273,10 @@ function ExploreViewContainer(props) {
|
||||
if (!hasError) {
|
||||
props.actions.triggerQuery(true, props.chart.id);
|
||||
}
|
||||
}, []);
|
||||
|
||||
// effect to run when controls change
|
||||
useEffect(() => {
|
||||
if (previousControls) {
|
||||
if (props.controls.viz_type.value !== previousControls.viz_type.value) {
|
||||
props.actions.resetControls();
|
||||
|
||||
Reference in New Issue
Block a user