Search code examples
htmlcssreactjsag-grid-react

How to create delete button on mousehover like gmail in React


I want to display the delete action button on the mouse hover of each row like Gmail in AgGrid react.


Solution

  • You can do that using custom cellRenderer in react, as ag-grid doesn't provide a way to do that out of box.

    You can use css styling to show the buttons only on hover of row. ag-grid applies ag-row-hover class to the hovered row so you make use of this class.