diff --git a/frontend/src/AlbumStudio/AlbumStudio.js b/frontend/src/AlbumStudio/AlbumStudio.js index fb4d1fa4d..200b7ffe4 100644 --- a/frontend/src/AlbumStudio/AlbumStudio.js +++ b/frontend/src/AlbumStudio/AlbumStudio.js @@ -52,9 +52,10 @@ class AlbumStudio extends Component { constructor(props, context) { super(props, context); + this.scrollerRef = React.createRef(); + this.state = { estimatedRowSize: 100, - scroller: null, jumpBarItems: { order: [] }, scrollIndex: null, jumpCount: 0, @@ -111,13 +112,6 @@ class AlbumStudio extends Component { } } - // - // Control - - setScrollerRef = (ref) => { - this.setState({ scroller: ref }); - }; - setJumpBarItems() { const { items, @@ -325,7 +319,6 @@ class AlbumStudio extends Component { allSelected, allUnselected, estimatedRowSize, - scroller, jumpBarItems, scrollIndex } = this.state; @@ -348,7 +341,7 @@ class AlbumStudio extends Component {
@@ -363,13 +356,16 @@ class AlbumStudio extends Component { } { - !error && isPopulated && !!items.length && + !error && + isPopulated && + !!items.length && + this.scrollerRef.current ?
-
+
: + null } { diff --git a/frontend/src/UnmappedFiles/UnmappedFilesTable.js b/frontend/src/UnmappedFiles/UnmappedFilesTable.js index 75a4d1d06..a326f91e0 100644 --- a/frontend/src/UnmappedFiles/UnmappedFilesTable.js +++ b/frontend/src/UnmappedFiles/UnmappedFilesTable.js @@ -30,7 +30,6 @@ class UnmappedFilesTable extends Component { this.scrollerRef = React.createRef(); this.state = { - scroller: null, allSelected: false, allUnselected: false, lastToggled: null,