File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
apps/web/src/features/datahub/components Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -4,18 +4,24 @@ import { useTranslation } from '@douglasneuroinformatics/libui/hooks';
44import type { Subject } from '@opendatacapture/schemas/subject' ;
55import { removeSubjectIdScope } from '@opendatacapture/subject-utils' ;
66
7+ import { useAppStore } from '@/store' ;
8+
79export type MasterDataTableProps = {
810 data : Subject [ ] ;
911 onSelect : ( subject : Subject ) => void ;
1012} ;
1113
1214export const MasterDataTable = ( { data, onSelect } : MasterDataTableProps ) => {
1315 const { t } = useTranslation ( ) ;
16+ const subjectIdDisplaySetting = useAppStore ( ( store ) => store . currentGroup ?. settings . subjectIdDisplayLength ) ;
1417 return (
1518 < ClientTable < Subject >
1619 columns = { [
1720 {
18- field : ( subject ) => removeSubjectIdScope ( subject . id ) . slice ( 0 , 9 ) ,
21+ field : ( subject ) =>
22+ subjectIdDisplaySetting
23+ ? removeSubjectIdScope ( subject . id ) . slice ( 0 , subjectIdDisplaySetting )
24+ : removeSubjectIdScope ( subject . id ) . slice ( 0 , 9 ) ,
1925 label : t ( 'datahub.index.table.subject' )
2026 } ,
2127 {
You can’t perform that action at this time.
0 commit comments