How to show hand hover on ReactTable rows in "React.js"

Shr*_*wal 2 reactjs

<div>
     <ReactTable
         data={this.state.listFruitData}
         columns={columns}
         defaultPageSize={10}
         getTrProps={onRowClick}
     />
</div>
Run Code Online (Sandbox Code Playgroud)
  1. I am actually populating data(listFruitData) in ReactTable from post request call.
  2. My requirement is I need to first select row of ReactTable may be using some background color so that it looks like the row is selected
  3. While I am selecting row I should get hand(icon) hover on ReactTable row
  4. How to do this?

小智 7

You just need to add a style for cursor From your onRowClick function you can return a style object along with the onClick handler. In your onRowClick

onRowClick = () => {
return {
    onClick: () => {}, // your onClick handler
    style: {
           cursor: 'pointer'
    },
   }
}
Run Code Online (Sandbox Code Playgroud)

Hope this helps