mirror of
https://gitlab.com/mbugroup/lti-web-client.git
synced 2026-05-20 13:32:00 +00:00
refactor(FE): Conditionally load data based on filter modal state
This commit is contained in:
@@ -313,7 +313,7 @@ const RecordingTable = () => {
|
||||
isLoadingOptions: isLoadingLocationOptions,
|
||||
loadMore: loadMoreLocations,
|
||||
} = useSelect<Location>(
|
||||
LocationApi.basePath,
|
||||
filterModal.open ? LocationApi.basePath : null,
|
||||
'id',
|
||||
'name',
|
||||
'search',
|
||||
@@ -325,7 +325,12 @@ const RecordingTable = () => {
|
||||
options: areaOptions,
|
||||
isLoadingOptions: isLoadingAreaOptions,
|
||||
loadMore: loadMoreAreas,
|
||||
} = useSelect<Area>(AreaApi.basePath, 'id', 'name', 'search');
|
||||
} = useSelect<Area>(
|
||||
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',
|
||||
|
||||
Reference in New Issue
Block a user