diff --git a/ui/v2/src/hooks/ListHook.tsx b/ui/v2/src/hooks/ListHook.tsx index 20942e4e6..53ea3f515 100644 --- a/ui/v2/src/hooks/ListHook.tsx +++ b/ui/v2/src/hooks/ListHook.tsx @@ -348,6 +348,25 @@ export class ListHook { } }) : undefined; + function maybeRenderContent() { + if (!result.loading && !result.error) { + return options.renderContent(result, filter, selectedIds, zoomIndex); + } + } + + function maybeRenderPagination() { + if (!result.loading && !result.error) { + return ( + + ); + } + } + const template = (
0 ? options.renderSelectedOptions(result, selectedIds) : undefined} {result.loading || (!options.subComponent && !forageInitialised.current) ? : undefined} {result.error ?

{result.error.message}

: undefined} - {options.renderContent(result, filter, selectedIds, zoomIndex)} - + {maybeRenderContent()} + {maybeRenderPagination()}
);