Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chore/resolve stage conflicts #2912

Merged
merged 20 commits into from
Aug 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
e69736b
Enhancment/Grant app permissions to new system roles (#2863)
agalin920 Jul 22, 2024
7398833
[Content] Do not show edit template for datasets (#2870)
finnar-bin Jul 23, 2024
8d30954
Schema rules limit file type for media field (#2867)
agalin920 Jul 23, 2024
4d91e56
[Content] Do not show the model as a breadcrumb item when in multipag…
finnar-bin Jul 23, 2024
dc88b71
Fix/table sort by display date field by accounting for empty date val…
agalin920 Jul 23, 2024
b9acd99
Reference createdAt timestamp outside of history object (#2868)
agalin920 Jul 24, 2024
1727581
[Schema | Content] Currency field revamp (#2873)
finnar-bin Jul 25, 2024
bae5cea
[Schema] Currency field vqa updates (#2883)
finnar-bin Jul 26, 2024
8c0f3ac
vqa fixes media schema rules (#2890)
agalin920 Jul 29, 2024
88613eb
[Content] Show image placeholder in publish modal dialog (#2888)
finnar-bin Jul 30, 2024
f3271c2
Hide publish based on permissions on code app (#2887)
agalin920 Jul 30, 2024
361736c
[Content] Do not store pinned columns to local storage (#2892)
finnar-bin Jul 30, 2024
b88aa66
[Content] Multipage table advanced sorting (#2884)
finnar-bin Jul 31, 2024
d49cc5f
[Content] Filter button icon update & show api endpoints on hover (#2…
finnar-bin Jul 31, 2024
379c957
[Content] Only show publish actions when dropdown selection has chang…
finnar-bin Jul 31, 2024
21fc276
[Media] File replacement (#2849)
finnar-bin Aug 1, 2024
2362709
media rules vqa (#2904)
agalin920 Aug 1, 2024
4b76474
[Content] Remove replace file option for non-zesty media files (#2905)
finnar-bin Aug 1, 2024
13cf24f
[Content] Show that table is sorted in Last Saved desc when no other …
finnar-bin Aug 6, 2024
a2f9768
Merge branch 'stage' into chore/resolve-stage-conflicts
finnar-bin Aug 6, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion src/apps/content-editor/src/app/views/ItemList/ItemListTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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={
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,13 @@ type TableSortProviderType = {
children?: React.ReactNode;
};
export const TableSortProvider = ({ children }: TableSortProviderType) => {
const [sortModel, setSortModel] = useState<GridSortModel>([]);
// Note: We always want it to default to lastSaved if no other sorting is applied
const [sortModel, setSortModel] = useState<GridSortModel>([
{
field: "lastSaved",
sort: "desc",
},
]);
const { modelZUID } = useRouterParams<{ modelZUID: string }>();

useLayoutEffect(() => {
Expand Down