mirror of
https://github.com/apache/superset.git
synced 2024-09-06 22:07:34 -04:00
fix: Multiple dashboard refresh triggers for the same session (#16094)
This commit is contained in:
parent
bb1d8fe4ef
commit
07f33998ac
@ -48,7 +48,9 @@ import {
|
||||
SAVE_TYPE_OVERWRITE,
|
||||
DASHBOARD_POSITION_DATA_LIMIT,
|
||||
} from 'src/dashboard/util/constants';
|
||||
import setPeriodicRunner from 'src/dashboard/util/setPeriodicRunner';
|
||||
import setPeriodicRunner, {
|
||||
stopPeriodicRender,
|
||||
} from 'src/dashboard/util/setPeriodicRunner';
|
||||
import { options as PeriodicRefreshOptions } from 'src/dashboard/components/RefreshIntervalModal';
|
||||
|
||||
const propTypes = {
|
||||
@ -196,6 +198,8 @@ class Header extends React.PureComponent {
|
||||
}
|
||||
|
||||
componentWillUnmount() {
|
||||
stopPeriodicRender(this.refreshTimer);
|
||||
this.props.setRefreshFrequency(0);
|
||||
clearTimeout(this.ctrlYTimeout);
|
||||
clearTimeout(this.ctrlZTimeout);
|
||||
}
|
||||
|
@ -16,7 +16,7 @@
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
const stopPeriodicRender = (refreshTimer?: number) => {
|
||||
export const stopPeriodicRender = (refreshTimer?: number) => {
|
||||
if (refreshTimer) {
|
||||
clearInterval(refreshTimer);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user