From 9203951ec8a2ec099263f44f59548d02749e604b Mon Sep 17 00:00:00 2001 From: nick-delirium Date: Fri, 4 Oct 2024 17:54:03 +0200 Subject: [PATCH] fix assist list update btn --- .../shared/LiveSessionList/LiveSessionList.tsx | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/frontend/app/components/shared/LiveSessionList/LiveSessionList.tsx b/frontend/app/components/shared/LiveSessionList/LiveSessionList.tsx index 4c5d34262..943ff54eb 100644 --- a/frontend/app/components/shared/LiveSessionList/LiveSessionList.tsx +++ b/frontend/app/components/shared/LiveSessionList/LiveSessionList.tsx @@ -50,6 +50,11 @@ function LiveSessionList() { }; }, [metaListLoading]); + const refetch = () => { + searchStoreLive.edit({ ...filter }) + void searchStoreLive.fetchSessions(); + } + const onUserClick = (userId: string, userAnonymousId: string) => { if (userId) { searchStoreLive.addFilterByKeyAndValue(FilterKey.USERID, userId); @@ -64,7 +69,7 @@ function LiveSessionList() { const timeout = () => { timeoutId = setTimeout(() => { - searchStoreLive.edit({ ...filter }); + refetch(); timeout(); }, AUTOREFRESH_INTERVAL); }; @@ -76,10 +81,9 @@ function LiveSessionList() {

Co-Browse - {/* {numberWithCommas(total)} */}

- searchStoreLive.edit({ ...filter })} /> +
@@ -129,7 +133,7 @@ function LiveSessionList() { className="mt-4" icon="arrow-repeat" iconSize={20} - onClick={() => searchStoreLive.edit({ ...filter })} + onClick={refetch} > Refresh