[Glitch] Do not display empty message when the list is known to have more elements
This commit is contained in:
		
							parent
							
								
									39696024ca
								
							
						
					
					
						commit
						73ee38f485
					
				
					 1 changed files with 2 additions and 2 deletions
				
			
		| 
						 | 
					@ -164,7 +164,7 @@ export default class ScrollableList extends PureComponent {
 | 
				
			||||||
    const { fullscreen } = this.state;
 | 
					    const { fullscreen } = this.state;
 | 
				
			||||||
    const childrenCount = React.Children.count(children);
 | 
					    const childrenCount = React.Children.count(children);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    const loadMore     = (hasMore && childrenCount > 0 && onLoadMore) ? <LoadMore visible={!isLoading} onClick={this.handleLoadMore} /> : null;
 | 
					    const loadMore     = (hasMore && onLoadMore) ? <LoadMore visible={!isLoading} onClick={this.handleLoadMore} /> : null;
 | 
				
			||||||
    let scrollableArea = null;
 | 
					    let scrollableArea = null;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    if (showLoading) {
 | 
					    if (showLoading) {
 | 
				
			||||||
| 
						 | 
					@ -179,7 +179,7 @@ export default class ScrollableList extends PureComponent {
 | 
				
			||||||
          </div>
 | 
					          </div>
 | 
				
			||||||
        </div>
 | 
					        </div>
 | 
				
			||||||
      );
 | 
					      );
 | 
				
			||||||
    } else if (isLoading || childrenCount > 0 || !emptyMessage) {
 | 
					    } else if (isLoading || childrenCount > 0 || hasMore || !emptyMessage) {
 | 
				
			||||||
      scrollableArea = (
 | 
					      scrollableArea = (
 | 
				
			||||||
        <div className={classNames('scrollable', { fullscreen })} ref={this.setRef}>
 | 
					        <div className={classNames('scrollable', { fullscreen })} ref={this.setRef}>
 | 
				
			||||||
          <div role='feed' className='item-list'>
 | 
					          <div role='feed' className='item-list'>
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in a new issue