Open TPIvan opened 1 month ago
This is something that should have been addressed in the latest release by adding PopperStrategy parameter to the HxContextMenu. Are you on the latest version?
... we decided not to use attribute splatting for performance reasons as unlike the dropdowns or form controls, the context menu is usually rendered in a loop.
I have version 4.6.15 (installed yesterday). Applying the strategy through the attribute feels more like a workaround than a proper solution to me.
And what would be a proper solution to you?
Should you be interested, the discussion on this topic is here https://github.com/havit/Havit.Blazor/pull/844
I reviewed #844. In my opinion, the strategy should be controlled by the Responsive property without requiring any additional attributes, as "absolute" only works well in ideal conditions.
I currently need to apply strategy:fixed even if the dropdown is not in grid because of issues with scrollbars and partial visibility, but I have a complex form with independently scrollable sections.
I can confirm that the issue can be resolved using the PopperStrategy
attribute in the latest version. However, I still believe that this should be addressed within the grid component itself. Please feel free to close this issue if you disagree.
@crdo Can we add the PopperStrategy
to our demo and/or related instructions? Or is this still an "it depends" scenario, where you'd only want this strategy for certain HxGrid context menus?
Based on the internal discussion: If feasible (without impacting performance), we should set the new PopperStrategy
as the default for context menus within HxGrid
.
CascadingValue
if possible.PopperStrategy
to the demos.
Using
HxContextMenu
withinHxGrid
in responsive mode causes an extra vertical scrollbar to appear when the context menu dropdown is higher than the grid itself.Observed behavior: The grid displays an unnecessary vertical scrollbar when the context menu dropdown overflows the grid's height. Expected behavior (achieved with
<style type="text/css">.table-responsive {overflow-x:initial;} </style>
): The grid should not display an additional scrollbar, allowing the context menu dropdown to expand freely without affecting the grid's vertical scrolling. Steps to Reproduce:HxGrid
with context menus (https://havit.blazor.eu/components/HxGrid#context-menu).Set the
PageSize
property of theHxGrid
to 1.In my real situation, I have two rows in the grid and three rows in the context menu.
The problem is the same as described in issue #449, and the solution should follow the approach outlined in https://github.com/havit/Havit.Blazor/issues/450#issuecomment-2049223815. The problem is that it appears that there is currently no way to apply
AdditionalAttributes
to the dropdown toggler. I believe the correct solution would be forto be added by
HxGrid
whenResponsive="true"
.