diff --git a/src/MudBlazor/Services/KeyInterceptor/KeyOptions.cs b/src/MudBlazor/Services/KeyInterceptor/KeyOptions.cs index b6fd3c5081de..427af9fb965d 100644 --- a/src/MudBlazor/Services/KeyInterceptor/KeyOptions.cs +++ b/src/MudBlazor/Services/KeyInterceptor/KeyOptions.cs @@ -37,8 +37,6 @@ namespace MudBlazor.Services; /// public class KeyOptions { - //TODO: Make immutable in v8. - /// /// JavaScript keyboard event.key /// @@ -47,37 +45,37 @@ public class KeyOptions /// regex must be enclosed in two forward slashes! /// /// - public string? Key { get; set; } + public string? Key { get; init; } /// /// Subscribe down key and invoke event KeyDown on C# side /// - public bool SubscribeDown { get; set; } + public bool SubscribeDown { get; init; } /// /// Subscribe up key and invoke event KeyUp on C# side /// - public bool SubscribeUp { get; set; } + public bool SubscribeUp { get; init; } /// /// Configuration for preventDefault() on key down events. /// - public string PreventDown { get; set; } = "none"; + public string PreventDown { get; init; } = "none"; /// /// Configuration for preventDefault() on key up events. /// - public string PreventUp { get; set; } = "none"; + public string PreventUp { get; init; } = "none"; /// /// Configuration for stopPropagation() on key down events. /// - public string StopDown { get; set; } = "none"; + public string StopDown { get; init; } = "none"; /// /// Configuration for stopPropagation() on key up events. /// - public string StopUp { get; set; } = "none"; + public string StopUp { get; init; } = "none"; /// /// Initializes a new instance of the class.