From c10d79ffba8383e9559906f98bb858e6113bba83 Mon Sep 17 00:00:00 2001 From: Chisom Chima <87203527+Chisomchima@users.noreply.github.com> Date: Thu, 5 Dec 2024 15:38:56 +0100 Subject: [PATCH] fix: refresh list view on close of dialog (#461) --- src/components/sectionList/SectionListWrapper.tsx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/components/sectionList/SectionListWrapper.tsx b/src/components/sectionList/SectionListWrapper.tsx index e5bd8f08c..cbb937b52 100644 --- a/src/components/sectionList/SectionListWrapper.tsx +++ b/src/components/sectionList/SectionListWrapper.tsx @@ -44,6 +44,11 @@ export const SectionListWrapper = ({ BaseListModel | undefined >(undefined) + const onSharingDialogClose = () => { + setSharingDialogId(undefined) + refetch() + } + const SectionListMessage = () => { if (error) { console.log(error.details || error) @@ -159,7 +164,7 @@ export const SectionListWrapper = ({ but it works if you pass the correct type*/ // eslint-disable-next-line @typescript-eslint/no-explicit-any type={schema.singular as any} - onClose={() => setSharingDialogId(undefined)} + onClose={() => onSharingDialogClose()} /> )} {translationDialogModel && (