Gantt CellContextMenu not working when ContextMenu is defined

Fix #2514
This commit is contained in:
Vladimir Enchev
2026-04-02 16:51:15 +03:00
parent 6fb083483b
commit 82e8705593
2 changed files with 9 additions and 1 deletions

View File

@@ -5,7 +5,8 @@
@if (Visible)
{
<div @ref="@Element" id="@GetId()" class="@GetCssClass()" style="@RootStyle" @attributes="Attributes">
<div @ref="@Element" id="@GetId()" class="@GetCssClass()" style="@RootStyle" @attributes="Attributes"
@oncontextmenu="@OnContextMenu" @oncontextmenu:preventDefault="@this.ContextMenu.HasDelegate" @oncontextmenu:stopPropagation="@this.ContextMenu.HasDelegate">
@if (ShowNavigation)
{
<div class="rz-gantt-header">

View File

@@ -1023,6 +1023,13 @@ namespace Radzen.Blazor
#endregion
/// <inheritdoc />
/// <inheritdoc />
protected override async Task AddContextMenu()
{
await Task.CompletedTask;
}
/// <inheritdoc />
protected override string GetComponentCssClass() => "rz-gantt";