diff --git a/src/components/pages/production/recording/RecordingTable.tsx b/src/components/pages/production/recording/RecordingTable.tsx index 13737cf3..752ae1d1 100644 --- a/src/components/pages/production/recording/RecordingTable.tsx +++ b/src/components/pages/production/recording/RecordingTable.tsx @@ -313,7 +313,7 @@ const RecordingTable = () => { isLoadingOptions: isLoadingLocationOptions, loadMore: loadMoreLocations, } = useSelect( - LocationApi.basePath, + filterModal.open ? LocationApi.basePath : null, 'id', 'name', 'search', @@ -325,7 +325,12 @@ const RecordingTable = () => { options: areaOptions, isLoadingOptions: isLoadingAreaOptions, loadMore: loadMoreAreas, - } = useSelect(AreaApi.basePath, 'id', 'name', 'search'); + } = useSelect( + filterModal.open ? AreaApi.basePath : null, + 'id', + 'name', + 'search' + ); const projectFlockParams = useMemo(() => { if (filterProjectFlockLocationId) { @@ -341,7 +346,7 @@ const RecordingTable = () => { isLoadingOptions: isLoadingProjectFlocks, loadMore: loadMoreProjectFlocks, } = useSelect( - ProjectFlockApi.basePath, + filterModal.open ? ProjectFlockApi.basePath : null, 'id', 'flock_name', 'search',