Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Open context menu on table row right click

Tags:

antd

Is it possible to have the Dropdown Context Menu work for the whole Table row? We can render the Dropdown using the cell render method, but that way it doesn't cover the whole table cell because of cell padding. Thus the user has to precisely click the displayed text, instead of the whole cell.

like image 611
Tommy Jakobsen Avatar asked Mar 20 '18 10:03

Tommy Jakobsen


1 Answers

For the context menu you can use Dropdown or Popover components with some css customization, but the problem is the popup menu doesn't appear next to mouse pointer, it appears relatively to a wrapped element. You can check it here what I ment above.

I have made a custom Popup component. It looks for me some how ugly but anyway it works fine. You can check it here.

like image 147
sultan Avatar answered Sep 20 '22 10:09

sultan