disable load more button when data are been loaded
This commit is contained in:
parent
d19756b537
commit
c0b9b66b9d
|
|
@ -28,7 +28,7 @@ const JKPeopleList = ({ people, goNextPage, hasNext, isLoading }) => {
|
|||
</Table>
|
||||
|
||||
{hasNext && (
|
||||
<Button color="primary" outline={true} onClick={() => goNextPage()} data-testid="paginate-next-page">
|
||||
<Button color="primary" outline={true} onClick={() => goNextPage()} disabled={isLoading} data-testid="paginate-next-page">
|
||||
{isLoading ? <span>Loading...</span> : <span>Load More</span>}
|
||||
</Button>
|
||||
)}
|
||||
|
|
|
|||
Loading…
Reference in New Issue