In my MUI Table I navigate the user to another page when is clicked over the row. Is there a option to pass the data from the row directly with useNavigate, instead of using localStorage ?
<TableBody>
{data &&
data.map((row, index) => (
<TableRow
hover
key={index}
onClick={(e) => {
navigate('/assets-list') // <====== From here it Start
window.localStorage.setItem('selectedAsset', row);
}}
sx={{ cursor: 'pointer' }}
>
<TableCell size="small">
<Typography align="left" variant="subtitle1" component="div">
{row.ASSET_NAME}
<Typography variant="subtitle2">{row.ASSET_TYPE_NAME}</Typography>
</Typography>
</TableCell>
<TableCell>
<Typography align="left" variant="subtitle1" component="div">
{row.BRAND}
</Typography>
</TableCell>
</TableRow>
))}
</TableBody>