()
| 361 | } |
| 362 | |
| 363 | componentWillUpdate() { |
| 364 | const { transitionDuration } = this.props; |
| 365 | |
| 366 | // Calculating the dimensions trigger a DOM repaint which |
| 367 | // breaks the CSS transition. |
| 368 | // The setTimeout will wait until the transition ends. |
| 369 | if (this.calendarInfo) { |
| 370 | this.setCalendarInfoWidthTimeout = setTimeout(() => { |
| 371 | const { calendarInfoWidth } = this.state; |
| 372 | const calendarInfoPanelWidth = calculateDimension(this.calendarInfo, 'width', true, true); |
| 373 | if (calendarInfoWidth !== calendarInfoPanelWidth) { |
| 374 | this.setState({ |
| 375 | calendarInfoWidth: calendarInfoPanelWidth, |
| 376 | }); |
| 377 | } |
| 378 | }, transitionDuration); |
| 379 | } |
| 380 | } |
| 381 | |
| 382 | componentDidUpdate(prevProps, prevState) { |
| 383 | const { |
nothing calls this directly
no test coverage detected