Reputation: 1243
I am using React table and want to change Tr style on one column click.
I am not able to find any documentation or sample to achive this simple task.
header: 'Name',
columns: [{
render: (rowInfo, column) => {
const onClicked = () => {
console.log('How i can change Tr style here');
};
return (
<span onClick= {onClicked} className='number'>close</span>
)
}
}
Refer code pen link http://codepen.io/parmodkrarora/pen/wdWoBd/?editors=0010
Upvotes: 0
Views: 1576
Reputation: 1243
I put all the data in state and changed the state on click with flag selected. After changing state in click handler child component refresh automatically. Thanks Spencer BIgum
Upvotes: 2