Skip to content

Commit

Permalink
order param set from dataStore config
Browse files Browse the repository at this point in the history
  • Loading branch information
cnandza committed Sep 19, 2024
1 parent d8d68fd commit 326110e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/hooks/tableData/useTableData.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ export function useTableData() {
const registrationResults: RegistrationQueryResults = await engine.query(EVENT_QUERY({
ouMode: undefined as unknown as string,
program: getDataStoreData?.program as unknown as string,
order: "createdAt:desc",
order: getDataStoreData?.defaults?.defaultOrder || "createdAt:desc",
programStage: getDataStoreData?.registration?.programStage as unknown as string,
orgUnit: tei.orgUnit,
trackedEntity: tei.trackedEntity
Expand Down
1 change: 1 addition & 0 deletions src/types/dataStore/DataStoreConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ interface transfer {

interface defaults {
currentAcademicYear: string
defaultOrder: string
}

interface filterItem {
Expand Down

0 comments on commit 326110e

Please sign in to comment.