react-bootstrap-table icon indicating copy to clipboard operation
react-bootstrap-table copied to clipboard

Is there a way where onClick + button increase the counter of that particular row only not all the rows?

Open dashName opened this issue 7 years ago • 1 comments

I am trying something like below but it updates all the row: const dataFormatter = (cell, row, rowIndex,formatExtraData) => { return (

<div onClick={() => addToCart(rowIndex)}><img src={plus} style={{backgroundColor: '#2a4252'}}/>
<div style={{backgroundColor: '#fff', padding: '2px 5px',outline:'none'}}> {formatExtraData}
<div onClick={() => removeFromCart(rowIndex)}><img src={minus} style={{backgroundColor: '#2a4252'}}/>
); };

dashName avatar Oct 08 '19 18:10 dashName

Screen Shot 2019-10-08 at 11 18 20 AM

dashName avatar Oct 08 '19 18:10 dashName