stavroskasidis / BlazorContextMenu

A context menu component for Blazor !
MIT License
531 stars 58 forks source link

Configurable direction of menu-open (e.g. bottom-right, top-left) #120

Open rummelsworth opened 2 years ago

rummelsworth commented 2 years ago

Is your feature request related to a problem? Please describe. I'd like to configure the context menu to open to the top-left instead of to the bottom-right. Currently, the menus seem to always open to the bottom-right, although they do seem to nicely reverse direction when there's not enough room.

Describe the solution you'd like It'd be nice if the trigger element or the menu element had another parameter property that allowed this configuration. The default could be something like MenuOpenDirection.BottomRight and in my own use-case I'd explicitly set it to MenuOpenDirection.TopLeft.

Describe alternatives you've considered I scanned the docs & code for any ideas on how to get this to happen, but I came up empty-handed. I might try diving more deeply into the code to try to figure out what to change so I can get it to work. If I surprise myself and actually figure it out, I'll happily report back here.

Additional context None right now.