Skip to content

Commit 1b13faf

Browse files
committed
adjust column id
1 parent 4b79636 commit 1b13faf

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

apps/web/src/routes/_app/datahub/index.tsx

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ const Filters: React.FC<{ table: TanstackTable.Table<Subject> }> = ({ table }) =
4141

4242
const columns = table.getAllColumns();
4343

44-
const dobColumn = columns.find((column) => column.id === 'date-of-birth')!;
44+
const dobColumn = columns.find((column) => column.id === 'dateOfBirth')!;
4545
const dobFilter = dobColumn.getFilterValue() as DateFilter;
4646

4747
const sexColumn = columns.find((column) => column.id === 'sex')!;
@@ -311,7 +311,7 @@ const MasterDataTable: React.FC<{
311311
id: 'subjectId'
312312
},
313313
{
314-
accessorFn: (subject) => subject.dateOfBirth,
314+
accessorKey: 'dateOfBirth',
315315
cell: (ctx) => {
316316
const value = ctx.getValue() as Date | null | undefined;
317317
return value ? toBasicISOString(value) : 'NULL';
@@ -327,8 +327,7 @@ const MasterDataTable: React.FC<{
327327
}
328328
return true;
329329
},
330-
header: t('core.identificationData.dateOfBirth.label'),
331-
id: 'date-of-birth'
330+
header: t('core.identificationData.dateOfBirth.label')
332331
},
333332
{
334333
accessorFn: (subject) => subject.sex ?? null,
@@ -358,7 +357,7 @@ const MasterDataTable: React.FC<{
358357
value: ['MALE', 'FEMALE', null] satisfies SexFilter
359358
},
360359
{
361-
id: 'date-of-birth',
360+
id: 'dateOfBirth',
362361
value: {
363362
allowNull: true,
364363
max: null,

0 commit comments

Comments
 (0)