Skip to content
Snippets Groups Projects
Unverified Commit 3467d911 authored by Anton Kulyk's avatar Anton Kulyk Committed by GitHub
Browse files

Fix error after turning a question into a modal (#19721)

parent a6d96ca9
No related branches found
No related tags found
No related merge requests found
......@@ -110,11 +110,14 @@ export default class TableInteractive extends Component {
}
UNSAFE_componentWillReceiveProps(newProps) {
if (
this.props.data &&
newProps.data &&
!_.isEqual(this.props.data.cols, newProps.data.cols)
) {
const { card, data } = this.props;
const { card: nextCard, data: nextData } = newProps;
const isDataChange =
data && nextData && !_.isEqual(data.cols, nextData.cols);
const isDatasetStatusChange = card.dataset !== nextCard.dataset;
if (isDataChange && !isDatasetStatusChange) {
this.resetColumnWidths();
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment