♻️(frontend) datagrid ordered by updated_at desc

The datagrid is now ordered by updated_at desc.
This commit is contained in:
Anthony LC
2024-08-23 13:20:32 +02:00
committed by Anthony LC
parent 3a420c0416
commit ced850aecf
2 changed files with 102 additions and 78 deletions

View File

@@ -53,7 +53,12 @@ export const DocsGrid = () => {
const pagination = usePagination({
pageSize: PAGE_SIZE,
});
const [sortModel, setSortModel] = useState<SortModel>([]);
const [sortModel, setSortModel] = useState<SortModel>([
{
field: 'updated_at',
sort: 'desc',
},
]);
const { page, pageSize, setPagesCount } = pagination;
const [docs, setDocs] = useState<Doc[]>([]);