From 6b7a1499afbacc16b710e4efceb9f3aad33e84aa Mon Sep 17 00:00:00 2001 From: Shekar Siri Date: Thu, 7 Nov 2024 10:42:52 +0100 Subject: [PATCH] fix(ui): assist sort selection --- .../shared/LiveSessionList/LiveSessionList.tsx | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/frontend/app/components/shared/LiveSessionList/LiveSessionList.tsx b/frontend/app/components/shared/LiveSessionList/LiveSessionList.tsx index e027fb1ae..aa043a42a 100644 --- a/frontend/app/components/shared/LiveSessionList/LiveSessionList.tsx +++ b/frontend/app/components/shared/LiveSessionList/LiveSessionList.tsx @@ -24,7 +24,7 @@ function LiveSessionList() { const totalLiveSessions = sessionStore.totalLiveSessions; const loading = sessionStore.loadingLiveSessions; const { currentPage } = searchStoreLive; - const metaList = customFieldStore.list; + const metaList = customFieldStore.list const metaListLoading = customFieldStore.isLoading; let timeoutId: any; @@ -32,9 +32,9 @@ function LiveSessionList() { const hasUserFilter = filters.map((i: any) => i.key).includes(KEYS.USERID); const sortOptions = [{ label: 'Start Time', value: 'timestamp' }].concat( metaList - .map((i: any) => ({ - label: capitalize(i), - value: i + .map(({ key} : any) => ({ + label: capitalize(key), + value: key })) ); @@ -66,6 +66,7 @@ function LiveSessionList() { const onSortChange = ({ value }: any) => { searchStoreLive.edit({ sort: value.value }); + void searchStoreLive.fetchSessions(); }; const timeout = () => {