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:
mgabdev 2020-05-15 01:34:30 -04:00
parent 3725bfa5ef
commit 273925da8a
2 changed files with 9 additions and 0 deletions

View File

@ -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

View File

@ -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>
);