fix: error page is updated (#1394)

This commit is contained in:
Palash 2022-07-14 17:14:13 +05:30 committed by GitHub
parent a8c7237bbb
commit 3200248e98
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -188,14 +188,14 @@ function AllErrors(): JSX.Element {
sorter, sorter,
) => { ) => {
if (!Array.isArray(sorter)) { if (!Array.isArray(sorter)) {
const { current = 0, pageSize = 0 } = paginations; const { pageSize = 0, current = 0 } = paginations;
const { columnKey = '', order } = sorter; const { columnKey = '', order } = sorter;
const updatedOrder = order === 'ascend' ? 'ascending' : 'descending'; const updatedOrder = order === 'ascend' ? 'ascending' : 'descending';
history.replace( history.replace(
`${pathname}?${createQueryParams({ `${pathname}?${createQueryParams({
order: updatedOrder, order: updatedOrder,
offset: current - 1, offset: (current - 1) * pageSize,
orderParam: columnKey, orderParam: columnKey,
pageSize, pageSize,
})}`, })}`,
@ -213,7 +213,7 @@ function AllErrors(): JSX.Element {
pagination={{ pagination={{
pageSize: getUpdatedPageSize, pageSize: getUpdatedPageSize,
responsive: true, responsive: true,
current: getUpdatedOffset + 1, current: getUpdatedOffset / 10 + 1,
position: ['bottomLeft'], position: ['bottomLeft'],
total: errorCountResponse.data?.payload || 0, total: errorCountResponse.data?.payload || 0,
}} }}