File tree Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Original file line number Diff line number Diff line change @@ -27,7 +27,6 @@ export default class TimeGrid extends Component {
2727 }
2828
2929 getSnapshotBeforeUpdate ( ) {
30- this . calculateScroll ( )
3130 this . checkOverflow ( )
3231 return null
3332 }
@@ -36,6 +35,8 @@ export default class TimeGrid extends Component {
3635 if ( this . props . width == null ) {
3736 this . measureGutter ( )
3837 }
38+
39+ this . calculateScroll ( )
3940 this . applyScroll ( )
4041
4142 window . addEventListener ( 'resize' , this . handleResize )
@@ -277,11 +278,7 @@ export default class TimeGrid extends Component {
277278
278279 applyScroll ( ) {
279280 // If auto-scroll is disabled, we don't actually apply the scroll
280- if (
281- ! this . props . selected &&
282- this . _scrollRatio != null &&
283- this . props . enableAutoScroll === true
284- ) {
281+ if ( this . _scrollRatio != null && this . props . enableAutoScroll === true ) {
285282 const content = this . contentRef . current
286283 content . scrollTop = content . scrollHeight * this . _scrollRatio
287284 // Only do this once
You can’t perform that action at this time.
0 commit comments