You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would like to create a custom mantine-datatable component for a paginated table. I tried this approach but the problem is the record param in the render function doesn't get inferred correctly and it gets inferred as any instead. This is the code:
const{data: templates}=trpc.labelTemplate.getAll.useQuery()// templates is of type: `EntityDTO<LabelTemplate>[] | undefined`<PaginatedDatatabledata={templates}pageSize={3}columns={[{accessor: 'labelSize',title: 'Label size',render: (record)=>{// <== record not inferred as `any`// some code goes here...}}]}/>
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hello,
I would like to create a custom
mantine-datatable
component for a paginated table. I tried this approach but the problem is therecord
param in therender
function doesn't get inferred correctly and it gets inferred asany
instead. This is the code:This is the implementation of the component:
I would appreciate any help. Thank you very much.
Beta Was this translation helpful? Give feedback.
All reactions