Skip to content

Commit be23d23

Browse files
committed
fix review issues
1 parent 23089e2 commit be23d23

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

CS/EFCore/CustomViewItem/CustomViewItem.Blazor.Server/Editors/ButtonViewItem/Button.razor

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@
66
[Parameter]
77
public string Text { get; set; }
88
[Parameter]
9-
public EventCallback Click { get; set; }
9+
public EventCallback<MouseEventArgs> Click { get; set; }
1010
}

CS/EFCore/CustomViewItem/CustomViewItem.Blazor.Server/Editors/ButtonViewItem/ButtonDetailViewItemBlazor.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
using DevExpress.ExpressApp.Editors;
66
using DevExpress.ExpressApp.Model;
77
using Microsoft.AspNetCore.Components;
8+
using Microsoft.AspNetCore.Components.Web;
89

910
namespace CustomViewItem.Blazor.Server.Editors.ButtonViewItem;
1011

@@ -16,6 +17,8 @@ public class ButtonDetailViewItemBlazor(IModelViewItem model, Type objectType) :
1617
IComponentContentHolder,
1718
IComplexViewItem
1819
{
20+
public ButtonModel ComponentModel => componentModel;
21+
1922
private ButtonModel componentModel;
2023
private XafApplication application;
2124

@@ -29,7 +32,7 @@ protected override object CreateControlCore() {
2932
componentModel = new ButtonModel
3033
{
3134
Text = "Click me!",
32-
Click = EventCallback.Factory.Create(this, ComponentModel_Click),
35+
Click = EventCallback.Factory.Create<MouseEventArgs>(this, ComponentModel_Click),
3336
};
3437
return componentModel;
3538
}

CS/EFCore/CustomViewItem/CustomViewItem.Blazor.Server/Editors/ButtonViewItem/ButtonModel.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
using DevExpress.ExpressApp.Blazor.Components.Models;
22
using Microsoft.AspNetCore.Components;
3+
using Microsoft.AspNetCore.Components.Web;
34

45
namespace CustomViewItem.Blazor.Server.Editors.ButtonViewItem;
56

@@ -8,8 +9,8 @@ public string Text {
89
get => GetPropertyValue<string>();
910
set => SetPropertyValue(value);
1011
}
11-
public EventCallback Click {
12-
get => GetPropertyValue<EventCallback>();
12+
public EventCallback<MouseEventArgs> Click {
13+
get => GetPropertyValue<EventCallback<MouseEventArgs>>();
1314
set => SetPropertyValue(value);
1415
}
1516

0 commit comments

Comments
 (0)