i need to pass the information of a row to another page, like a profile using the rowdata
this is the table
<DataTable
value={mixMantenimiento}
paginator
responsiveLayout="scroll"
stripedRows
selectionMode="single"
selection={selectedBus}
onSelectionChange={(e) => setSelectedBus(e.value)}
dataKey="id"
header={header}
globalFilter={globalFilter}
paginatorTemplate="CurrentPageReport FirstPageLink PrevPageLink PageLinks NextPageLink LastPageLink "
currentPageReportTemplate="Mostrando {first} a {last} de {totalRecords}"
rows={15}
>
<Column field="id" header="ID" sortable />
<Column
field="online"
header="Online/Offline"
headerStyle={{ width: '5rem' }}
body={onlineDataBodyTemplate}
/>
<Column field="bus_name" header="Bus" sortable />
<Column
field="soc"
header="Estado Carga"
sortable
body={socBodyTemplate}
/>
<Column field="odometer" header="Kilometraje" sortable />
<Column
field="isolation"
header="Aislacion Bus"
sortable
body={isolationBodyTemplate}
/>
<Column
field="fusi_activo"
header="Codigo Fusi"
sortable
body={codigoFusiBodyTemplate}
/>
<Column
field="actualizacion"
header="Ultima Actualizacion"
sortable
style={{ color: 'ghostwhite' }}
/>
<Column body={actionBodyTemplate} />
</DataTable>
and with this i can go to the profile page but i dont know how to rescue the row data
const actionBodyTemplate = (rowData) => {
return (
<Link to={`/PerfilLink/`}>
<Button
icon="pi pi-arrow-right"
className="p-button-rounded p-button-info p-mr-2"
></Button>
</Link>
//<Button icon="pi pi-arrow-right" className="p-button-rounded p-button-info p-mr-2" ></Button>
);
};
here in last column I have added this Link which will be responsible for redirection. Now how to pass along the data to that page.