In my React application, I need to open a page in new window when clicking a link in the Bootstrap table. Please help me with the example.
Earlier, I have set the table cell in a variable and assigned it to dataformat in the table header. How can I change this code to open in new window?
Update: After making the code changes as suggested below, the page is opening in a new tab but the testid is not passing to the other page (which is fetched using this.props.testid).
column1 = (cell, row) => {
let link = `${cell}`
return (
<Link to={{
pathname: '/test',
state: {
testId: row.testid
}
}} target="_blank" rel='noopener noreferrer'>
{cell}
</Link>
}