From 262533ec8f476e8fa08cdba32ca1d826ab5cc27f Mon Sep 17 00:00:00 2001 From: FlipWarthog <83613837+FlipWarthog@users.noreply.github.com> Date: Thu, 17 Feb 2022 03:04:47 -0500 Subject: [PATCH] Fix #2594: DataTable: Responsive broken in 7.2.0 (#2595) --- components/lib/datatable/DataTable.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/components/lib/datatable/DataTable.js b/components/lib/datatable/DataTable.js index 4b41be49e5..0c7b0dc929 100644 --- a/components/lib/datatable/DataTable.js +++ b/components/lib/datatable/DataTable.js @@ -1531,11 +1531,11 @@ export class DataTable extends Component { componentDidMount() { this.setState({ attributeSelector: UniqueComponentId() }, () => { this.el.setAttribute(this.state.attributeSelector, ''); - }); - if (this.props.responsiveLayout === 'stack' && !this.props.scrollable) { - this.createResponsiveStyle(); - } + if (this.props.responsiveLayout === 'stack' && !this.props.scrollable) { + this.createResponsiveStyle(); + } + }); if (this.isStateful()) { this.setState(this.restoreState(this.state));