I have a custom component of the ant design pagination. I need the table size selection options: 10, 20, 30, 50, All. When user is choosing All it need to set PageSize to 1.000.000.
I figured out how to get around the restriction that it does not allow the use of words in the pageSizeOptions array, but there was a problem with the fact that when I select my “All” value, the value in the selector does not change and remains the previous one. I am attaching a part of the code that I wrote.
<PaginationComponent
disabled={disabled}
showSizeChanger
pageSize={pagination.perPage}
pageSizeOptions={['10', '20', '30', '50', 'All']}
onChange={onChangeHandler}
onShowSizeChange={(page, pageSize) => onShowSizeChangeHandler(page, isNaN(pageSize) ? 1000000 : pageSize)}
current={pagination.currentPage}
total={pagination.totalCount}
locale={{items_per_page: 'on page'}}/>;
Dark Shadow is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.