From d786a19725e95ff1bfdcb8b8352b9ddedb5f85d8 Mon Sep 17 00:00:00 2001 From: Graham McNeill Date: Tue, 10 Dec 2024 12:47:42 +0000 Subject: [PATCH] [Platform]: Use dependency in batching to force widget rerender (#616) --- packages/sections/src/credibleSet/GWASColoc/Body.tsx | 2 +- packages/sections/src/credibleSet/MolQTLColoc/Body.tsx | 2 +- packages/sections/src/credibleSet/Variants/Body.tsx | 2 +- packages/sections/src/disease/GWASStudies/Body.tsx | 2 +- packages/sections/src/study/GWASCredibleSets/Body.tsx | 2 +- packages/sections/src/study/SharedTraitStudies/Body.tsx | 6 +++--- packages/sections/src/variant/GWASCredibleSets/Body.tsx | 2 +- packages/sections/src/variant/QTLCredibleSets/Body.tsx | 2 +- 8 files changed, 10 insertions(+), 10 deletions(-) diff --git a/packages/sections/src/credibleSet/GWASColoc/Body.tsx b/packages/sections/src/credibleSet/GWASColoc/Body.tsx index 71cbb9a35..59ee550a7 100644 --- a/packages/sections/src/credibleSet/GWASColoc/Body.tsx +++ b/packages/sections/src/credibleSet/GWASColoc/Body.tsx @@ -220,7 +220,7 @@ function Body({ studyLocusId, entity }: BodyProps): ReactElement { getData().then(r => { setRequest(r); }); - }, []); + }, [studyLocusId]); return ( { setRequest(r); }); - }, []); + }, [studyLocusId]); return ( { setRequest(r); }); - }, []); + }, [studyLocusId]); const columns = getColumns({ leadVariantId, diff --git a/packages/sections/src/disease/GWASStudies/Body.tsx b/packages/sections/src/disease/GWASStudies/Body.tsx index e8cc92a8f..b625b2f02 100644 --- a/packages/sections/src/disease/GWASStudies/Body.tsx +++ b/packages/sections/src/disease/GWASStudies/Body.tsx @@ -136,7 +136,7 @@ function Body({ id: efoId, label: diseaseName }: BodyProps): ReactElement { getData().then(r => { setRequest(r); }); - }, []); + }, [efoId]); return ( { setRequest(r); }); - }, []); + }, [id]); return ( { setRequest(r); }); - }, []); + }, [studyId]); const columns = getColumns(diseaseIds); diff --git a/packages/sections/src/variant/GWASCredibleSets/Body.tsx b/packages/sections/src/variant/GWASCredibleSets/Body.tsx index b8840da86..de0c31015 100644 --- a/packages/sections/src/variant/GWASCredibleSets/Body.tsx +++ b/packages/sections/src/variant/GWASCredibleSets/Body.tsx @@ -262,7 +262,7 @@ function Body({ id, entity }: BodyProps) { getAllGwasData().then(r => { setRequest(r); }); - }, []); + }, [id]); return ( { setRequest(r); }); - }, []); + }, [id]); return (