inovua / reactdatagrid

Empower Your Data with the best React Data Grid there is
https://reactdatagrid.io
Other
3.44k stars 57 forks source link

Column context menu jump to top left of document #341

Open vasylHordynskyy opened 1 year ago

vasylHordynskyy commented 1 year ago

Relevant code or config

What you did: We implement simple grid view. Size of our grid is small so when we open column context menu on last column, it is not fully shown. Then I changed columnContextMenuPosition property to fixed. Column context menu is fully shown.

What happened: When I try to hide or show some column, column context menu jumps to top left of document or disappear.

Reproduction repository: https://reactdatagrid.io/docs/api-reference#props-columnContextMenuPosition

Problem description: Column context menu jump to left top position of document or hidden when I hide or show column using context menu.

Suggested solution:

DCMattyG commented 1 year ago

I'm seeing the exact same behavior in 5.8.4 when columnContextMenuPosition is set to "fixed" and you attempt to add/remove columns. The context menu flies up to the left corner of the screen.

React_Data_Grid_Menu_Issue

peterlau commented 11 months ago

Same here. The problem can be reproduced directly from the code snippet in the docs. Seems like its related to constrainTo being hardcode to true here: https://github.com/inovua/reactdatagrid/blame/07e0045fc678899e6979c137e9438e255221e331/community-edition/plugins/menus/useMenus/renderColumnContextMenu.tsx#L493

guergana commented 2 months ago

+1