|
|
@ -52,9 +52,10 @@ class AlbumStudio extends Component {
|
|
|
|
constructor(props, context) {
|
|
|
|
constructor(props, context) {
|
|
|
|
super(props, context);
|
|
|
|
super(props, context);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.scrollerRef = React.createRef();
|
|
|
|
|
|
|
|
|
|
|
|
this.state = {
|
|
|
|
this.state = {
|
|
|
|
estimatedRowSize: 100,
|
|
|
|
estimatedRowSize: 100,
|
|
|
|
scroller: null,
|
|
|
|
|
|
|
|
jumpBarItems: { order: [] },
|
|
|
|
jumpBarItems: { order: [] },
|
|
|
|
scrollIndex: null,
|
|
|
|
scrollIndex: null,
|
|
|
|
jumpCount: 0,
|
|
|
|
jumpCount: 0,
|
|
|
@ -111,13 +112,6 @@ class AlbumStudio extends Component {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//
|
|
|
|
|
|
|
|
// Control
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
setScrollerRef = (ref) => {
|
|
|
|
|
|
|
|
this.setState({ scroller: ref });
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
setJumpBarItems() {
|
|
|
|
setJumpBarItems() {
|
|
|
|
const {
|
|
|
|
const {
|
|
|
|
items,
|
|
|
|
items,
|
|
|
@ -325,7 +319,6 @@ class AlbumStudio extends Component {
|
|
|
|
allSelected,
|
|
|
|
allSelected,
|
|
|
|
allUnselected,
|
|
|
|
allUnselected,
|
|
|
|
estimatedRowSize,
|
|
|
|
estimatedRowSize,
|
|
|
|
scroller,
|
|
|
|
|
|
|
|
jumpBarItems,
|
|
|
|
jumpBarItems,
|
|
|
|
scrollIndex
|
|
|
|
scrollIndex
|
|
|
|
} = this.state;
|
|
|
|
} = this.state;
|
|
|
@ -348,7 +341,7 @@ class AlbumStudio extends Component {
|
|
|
|
|
|
|
|
|
|
|
|
<div className={styles.pageContentBodyWrapper}>
|
|
|
|
<div className={styles.pageContentBodyWrapper}>
|
|
|
|
<PageContentBody
|
|
|
|
<PageContentBody
|
|
|
|
registerScroller={this.setScrollerRef}
|
|
|
|
ref={this.scrollerRef}
|
|
|
|
className={styles.contentBody}
|
|
|
|
className={styles.contentBody}
|
|
|
|
innerClassName={styles.innerContentBody}
|
|
|
|
innerClassName={styles.innerContentBody}
|
|
|
|
>
|
|
|
|
>
|
|
|
@ -363,13 +356,16 @@ class AlbumStudio extends Component {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
{
|
|
|
|
{
|
|
|
|
!error && isPopulated && !!items.length &&
|
|
|
|
!error &&
|
|
|
|
|
|
|
|
isPopulated &&
|
|
|
|
|
|
|
|
!!items.length &&
|
|
|
|
|
|
|
|
this.scrollerRef.current ?
|
|
|
|
<div className={styles.contentBodyContainer}>
|
|
|
|
<div className={styles.contentBodyContainer}>
|
|
|
|
<VirtualTable
|
|
|
|
<VirtualTable
|
|
|
|
items={items}
|
|
|
|
items={items}
|
|
|
|
scrollIndex={scrollIndex}
|
|
|
|
scrollIndex={scrollIndex}
|
|
|
|
columns={columns}
|
|
|
|
columns={columns}
|
|
|
|
scroller={scroller}
|
|
|
|
scroller={this.scrollerRef.current}
|
|
|
|
isSmallScreen={isSmallScreen}
|
|
|
|
isSmallScreen={isSmallScreen}
|
|
|
|
overscanRowCount={5}
|
|
|
|
overscanRowCount={5}
|
|
|
|
rowRenderer={this.rowRenderer}
|
|
|
|
rowRenderer={this.rowRenderer}
|
|
|
@ -391,7 +387,8 @@ class AlbumStudio extends Component {
|
|
|
|
estimatedRowSize={estimatedRowSize}
|
|
|
|
estimatedRowSize={estimatedRowSize}
|
|
|
|
onRecompute={this.onGridRecompute}
|
|
|
|
onRecompute={this.onGridRecompute}
|
|
|
|
/>
|
|
|
|
/>
|
|
|
|
</div>
|
|
|
|
</div> :
|
|
|
|
|
|
|
|
null
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
{
|
|
|
|
{
|
|
|
|