File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ import {PaginatedStorageGroups} from './PaginatedStorageGroups';
22import { PaginatedStorageNodes } from './PaginatedStorageNodes' ;
33import type { StorageViewContext } from './types' ;
44import { useStorageQueryParams } from './useStorageQueryParams' ;
5+ import { getStorageGroupsInitialEntitiesCount , getStorageNodesInitialEntitiesCount } from './utils' ;
56
67export interface PaginatedStorageProps {
78 database ?: string ;
@@ -16,8 +17,6 @@ export interface PaginatedStorageProps {
1617 initialEntitiesCount ?: number ;
1718}
1819
19- const DEFAULT_ENTITIES_COUNT = 10 ;
20-
2120export const PaginatedStorage = ( props : PaginatedStorageProps ) => {
2221 const { storageType} = useStorageQueryParams ( ) ;
2322
@@ -26,15 +25,15 @@ export const PaginatedStorage = (props: PaginatedStorageProps) => {
2625 if ( isNodes ) {
2726 return (
2827 < PaginatedStorageNodes
29- initialEntitiesCount = { props . viewContext . nodeId ? 1 : DEFAULT_ENTITIES_COUNT }
28+ initialEntitiesCount = { getStorageNodesInitialEntitiesCount ( props . viewContext ) }
3029 { ...props }
3130 />
3231 ) ;
3332 }
3433
3534 return (
3635 < PaginatedStorageGroups
37- initialEntitiesCount = { props . viewContext . groupId ? 1 : DEFAULT_ENTITIES_COUNT }
36+ initialEntitiesCount = { getStorageGroupsInitialEntitiesCount ( props . viewContext ) }
3837 { ...props }
3938 />
4039 ) ;
You can’t perform that action at this time.
0 commit comments