sort detail wallet statement by created at
This commit is contained in:
@ -101,7 +101,7 @@ const ShowDetailWalletDialog = () => {
|
||||
{
|
||||
accessorKey: 'amount',
|
||||
header: ({ column }: any) => <DataGridColumnHeader title="Amount" column={column} />,
|
||||
enableSorting: true,
|
||||
enableSorting: false,
|
||||
cell: (info: any) => info.getValue()?.toFixed(2),
|
||||
meta: { headerClassName: 'min-w-[100px]' }
|
||||
},
|
||||
@ -162,7 +162,7 @@ const ShowDetailWalletDialog = () => {
|
||||
limit,
|
||||
page: page + 1,
|
||||
with_deleted: false,
|
||||
order_field: sorting?.[0]?.id ?? 'amount',
|
||||
order_field: sorting?.[0]?.id ?? 'created_at',
|
||||
order_direction: sorting?.[0]?.desc ? 'ASC' : 'DESC',
|
||||
filter: JSON.stringify(filters)
|
||||
}
|
||||
@ -191,7 +191,7 @@ const ShowDetailWalletDialog = () => {
|
||||
limit: 10000,
|
||||
page: 1,
|
||||
with_deleted: false,
|
||||
order_field: 'amount',
|
||||
order_field: 'created_at',
|
||||
order_direction: 'DESC',
|
||||
filter: JSON.stringify(filters)
|
||||
}
|
||||
@ -681,7 +681,7 @@ const ShowDetailWalletDialog = () => {
|
||||
columns={columns}
|
||||
pagination={{ size: 5 }}
|
||||
layout={{ card: true }}
|
||||
sorting={[{ id: 'amount', desc: false }]}
|
||||
sorting={[{ id: 'created_at', desc: false }]}
|
||||
serverSide={true}
|
||||
onFetchData={({ pageIndex, pageSize, sorting, columnFilters }) =>
|
||||
getTransactionLists(pageIndex, pageSize, sorting, columnFilters)
|
||||
|
||||
Reference in New Issue
Block a user