| - - | -No. | -Nama Lengkap | -Nomor Telp | -- Alamat Pengiriman - | -- Action - | + {showCheckbox && ( ++ + | + )} + {headers.map((header, index) => { + const isFirst = index === 0 && !showCheckbox; + const isLast = index === headers.length - 1; + return ( ++ {header.label} + | + ); + })}|
|---|---|---|---|---|---|---|---|---|
| - - | -{index + 1} | -{item.name} | -{item.email} | -{item.phone} | -{item.address} | -- - | + {showCheckbox && ( ++ + | + )} + {headers.map((header, colIndex) => { + const isFirst = colIndex === 0 && !showCheckbox; + const isLast = colIndex === headers.length - 1; + + return ( ++ {header.render + ? header.render(item, rowIndex) + : header.key + ? item[header.key] + : null} + | + ); + })}