Skip to content
Snippets Groups Projects
Unverified Commit 883e5cd3 authored by Mahatthana (Kelvin) Nomsawadi's avatar Mahatthana (Kelvin) Nomsawadi Committed by GitHub
Browse files

Fix sometimes table doesn't resize (#20954)

parent 80b6852c
Branches
Tags
No related merge requests found
......@@ -45,11 +45,11 @@ export default class DebouncedFrame extends React.Component {
return;
}
if (
this.props.width !== nextProps.width ||
this.props.height !== nextProps.height
this.state.width !== nextProps.width ||
this.state.height !== nextProps.height
) {
if (this.state.width == null || this.state.height == null) {
this.setSize(nextProps.width, nextProps.height);
this.setSizeDebounced(nextProps.width, nextProps.height);
} else {
this.setSizeDebounced(nextProps.width, nextProps.height);
this._transition = true;
......
......@@ -10,7 +10,7 @@ import { isCypressActive } from "metabase/env";
// After adding throttling for resize re-renders, our Cypress tests became flaky
// due to queried DOM elements are getting detached after re-renders
const throttleDuration = isCypressActive ? 0 : 500;
const throttleDuration = isCypressActive ? 0 : 300;
export default ({ selector, wrapped } = {}) => ComposedComponent =>
class extends Component {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment