diff --git a/PanoramicData.Blazor/PDTable.razor b/PanoramicData.Blazor/PDTable.razor
index b10929bcd..6b5f3cc80 100644
--- a/PanoramicData.Blazor/PDTable.razor
+++ b/PanoramicData.Blazor/PDTable.razor
@@ -10,7 +10,7 @@
@oncontextmenu:preventDefault
@ondrop="OnDragDropAsync"
@onkeydown="OnKeyDownAsync"
- @onkeydown:stopPropagation>
+ @onkeydown:stopPropagation>
@@ -59,7 +59,7 @@
@@ -133,13 +133,30 @@
{
}
- if (column.Template == null)
+
+ if (AllowRightClick)
{
- @column.GetRenderValue(item)
+
+ @if (column.Template == null)
+ {
+ @column.GetRenderValue(item)
+ }
+ else
+ {
+ @column.Template(item)
+ }
+
}
else
{
- @column.Template(item)
+ if (column.Template == null)
+ {
+ @column.GetRenderValue(item)
+ }
+ else
+ {
+ @column.Template(item)
+ }
}
}
diff --git a/PanoramicData.Blazor/PDTable.razor.cs b/PanoramicData.Blazor/PDTable.razor.cs
index 598e94e78..ef976774d 100644
--- a/PanoramicData.Blazor/PDTable.razor.cs
+++ b/PanoramicData.Blazor/PDTable.razor.cs
@@ -73,6 +73,11 @@ public partial class PDTable :
///
[Parameter] public bool AutoLoad { get; set; } = true;
+ ///
+ /// Determines whether items can be right-clicked to show a context menu or perform an action.
+ ///
+ [Parameter] public bool AllowRightClick { get; set; }
+
///
/// Callback fired before an item edit begins.
///