From ce81b754eb0c5ecb72030a25e5d2ad700ddb1083 Mon Sep 17 00:00:00 2001 From: Luke McFarlane Date: Tue, 10 Dec 2024 15:32:20 +1100 Subject: [PATCH] :bug: updated query to run offline, disabled caching Signed-off-by: Luke McFarlane --- app/src/gui/components/notebook/record_table.tsx | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/app/src/gui/components/notebook/record_table.tsx b/app/src/gui/components/notebook/record_table.tsx index 2f0529c47..05ca017a6 100644 --- a/app/src/gui/components/notebook/record_table.tsx +++ b/app/src/gui/components/notebook/record_table.tsx @@ -548,6 +548,8 @@ export function RecordsBrowseTable(props: RecordsBrowseTableProps) { const [query, setQuery] = React.useState(''); const {data: records, isLoading: recordsLoading} = useQuery({ queryKey: ['allrecords', query, props.project_id], + networkMode: 'always', + gcTime: 0, queryFn: async () => { if (query.length === 0) { return await getMetadataForAllRecords( @@ -562,10 +564,6 @@ export function RecordsBrowseTable(props: RecordsBrowseTableProps) { ); } }, - // TODO if we are seeing performance issues, really we should get told when - // to invalidate this cache. To be extra careful to keep records up to date - // we force a refresh on remount - refetchOnMount: true, }); return (