diff --git a/src/apps/content-editor/src/app/views/ItemList/ItemListTable.tsx b/src/apps/content-editor/src/app/views/ItemList/ItemListTable.tsx index 50fb6fb7ea..08f89f3277 100644 --- a/src/apps/content-editor/src/app/views/ItemList/ItemListTable.tsx +++ b/src/apps/content-editor/src/app/views/ItemList/ItemListTable.tsx @@ -405,7 +405,16 @@ export const ItemListTable = memo(({ loading, rows }: ItemListTableProps) => { sortModel={sortModel} sortingMode="server" onSortModelChange={(newSortModel) => { - setSortModel(newSortModel); + if (!Object.entries(newSortModel)?.length) { + setSortModel([ + { + field: "lastSaved", + sort: "desc", + }, + ]); + } else { + setSortModel(newSortModel); + } }} onSelectionModelChange={(newSelection) => setSelectedItems(newSelection)} selectionModel={ diff --git a/src/apps/content-editor/src/app/views/ItemList/TableSortProvider.tsx b/src/apps/content-editor/src/app/views/ItemList/TableSortProvider.tsx index 46af57c1a4..bb6bee3b40 100644 --- a/src/apps/content-editor/src/app/views/ItemList/TableSortProvider.tsx +++ b/src/apps/content-editor/src/app/views/ItemList/TableSortProvider.tsx @@ -15,7 +15,13 @@ type TableSortProviderType = { children?: React.ReactNode; }; export const TableSortProvider = ({ children }: TableSortProviderType) => { - const [sortModel, setSortModel] = useState([]); + // Note: We always want it to default to lastSaved if no other sorting is applied + const [sortModel, setSortModel] = useState([ + { + field: "lastSaved", + sort: "desc", + }, + ]); const { modelZUID } = useRouterParams<{ modelZUID: string }>(); useLayoutEffect(() => {