Updated load more button
- Hide load more button if is disabled or not visible - Show loader if no load more
This commit is contained in:
parent
3725bfa5ef
commit
273925da8a
@ -32,6 +32,8 @@ class LoadMore extends PureComponent {
|
||||
intl,
|
||||
} = this.props
|
||||
|
||||
if (!visible || disabled) return null
|
||||
|
||||
return (
|
||||
<div className={[_s.default, _s.py10, _s.px10].join(' ')}>
|
||||
<Button
|
||||
|
@ -5,6 +5,7 @@ import IntersectionObserverArticle from './intersection_observer_article'
|
||||
import IntersectionObserverWrapper from '../features/ui/util/intersection_observer_wrapper'
|
||||
import Responsive from '../features/ui/util/responsive_component'
|
||||
import Block from './block'
|
||||
import Icon from './icon'
|
||||
import ColumnIndicator from './column_indicator'
|
||||
import LoadMore from './load_more'
|
||||
|
||||
@ -253,6 +254,12 @@ export default class ScrollableList extends PureComponent {
|
||||
}
|
||||
|
||||
{loadMore}
|
||||
{
|
||||
isLoading &&
|
||||
<div className={[_s.default, _s.alignItemsCenter].join(' ')}>
|
||||
<Icon id='loading' />
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
|
Loading…
x
Reference in New Issue
Block a user