Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ```
- const columns = [
- {
- id: 'hours',
- header: 'Hours',
- columns:[
- ...Array(reports.length ? reports[0].payslip['hours'].length : 0).fill(0).map((_, index) => {
- return {
- id: 'whatever',
- header: (header) => {
- return <CellContent align="right">how do I access the content of the object here?</CellContent>
- }
- ,
- cell: (data) => {
- return <CellContent align="right">
- {data.row.original.payslip['hours'][index].total}
- </CellContent>
- },
- }
- }),
- ]
- }
- ]
- ```
Advertisement
Add Comment
Please, Sign In to add comment