File tree Expand file tree Collapse file tree
packages/plugin-detail/src Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -53,6 +53,9 @@ import { buildExpandFields } from '@object-ui/core';
5353import type { DetailViewSchema , DataSource } from '@object-ui/types' ;
5454import { useDetailTranslation } from './useDetailTranslation' ;
5555
56+ /** Default page size for related lists in the detail view */
57+ const DEFAULT_RELATED_PAGE_SIZE = 5 ;
58+
5659export interface DetailViewProps {
5760 schema : DetailViewSchema ;
5861 dataSource ?: DataSource ;
@@ -695,7 +698,7 @@ export const DetailView: React.FC<DetailViewProps> = ({
695698 dataSource = { dataSource }
696699 objectName = { related . api }
697700 collapsible
698- pageSize = { 5 }
701+ pageSize = { DEFAULT_RELATED_PAGE_SIZE }
699702 />
700703 ) ) }
701704 </ div >
@@ -780,7 +783,7 @@ export const DetailView: React.FC<DetailViewProps> = ({
780783 dataSource = { dataSource }
781784 objectName = { related . api }
782785 collapsible
783- pageSize = { 5 }
786+ pageSize = { DEFAULT_RELATED_PAGE_SIZE }
784787 />
785788 ) ) }
786789 </ div >
Original file line number Diff line number Diff line change @@ -270,7 +270,7 @@ export const RelatedList: React.FC<RelatedListProps> = ({
270270 : ( < ChevronDown className = "h-4 w-4 text-muted-foreground" /> )
271271 ) }
272272 < span > { title } </ span >
273- < Badge variant = "secondary" className = "text-xs font-normal" >
273+ < Badge variant = "secondary" className = "text-xs font-normal" aria-label = { ` ${ relatedData . length } records` } >
274274 { relatedData . length }
275275 </ Badge >
276276 </ div >
You can’t perform that action at this time.
0 commit comments