fix(ui): don't render load more button when grid is collapsed

This commit is contained in:
Łukasz Mierzwa
2020-03-31 14:38:27 +01:00
parent 9154391468
commit cb7edda148

View File

@@ -241,20 +241,24 @@ const Grid = observer(
))
: []}
</MasonryInfiniteScroller>
{grid.alertGroups.length > this.groupsToRender.value && (
<div className="d-flex flex-row justify-content-between">
<span className="flex-shrink-1 flex-grow-1 text-center">
<button
type="button"
className="btn btn-secondary mb-3"
onClick={this.loadMore}
>
<FontAwesomeIcon className="mr-2" icon={faAngleDoubleDown} />
Load more
</button>
</span>
</div>
)}
{this.gridToggle.show &&
grid.alertGroups.length > this.groupsToRender.value && (
<div className="d-flex flex-row justify-content-between">
<span className="flex-shrink-1 flex-grow-1 text-center">
<button
type="button"
className="btn btn-secondary mb-3"
onClick={this.loadMore}
>
<FontAwesomeIcon
className="mr-2"
icon={faAngleDoubleDown}
/>
Load more
</button>
</span>
</div>
)}
</React.Fragment>
);
}