Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 7 additions & 9 deletions src/MudBlazor/Services/KeyInterceptor/KeyOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,6 @@ namespace MudBlazor.Services;
/// </summary>
public class KeyOptions
{
//TODO: Make immutable in v8.

/// <summary>
/// <para>JavaScript keyboard event.key</para>
/// <para>
Expand All @@ -47,37 +45,37 @@ public class KeyOptions
/// regex must be enclosed in two forward slashes!
/// </para>
/// </summary>
public string? Key { get; set; }
public string? Key { get; init; }

/// <summary>
/// Subscribe down key and invoke event KeyDown on C# side
/// </summary>
public bool SubscribeDown { get; set; }
public bool SubscribeDown { get; init; }

/// <summary>
/// Subscribe up key and invoke event KeyUp on C# side
/// </summary>
public bool SubscribeUp { get; set; }
public bool SubscribeUp { get; init; }

/// <summary>
/// Configuration for preventDefault() on key down events.
/// </summary>
public string PreventDown { get; set; } = "none";
public string PreventDown { get; init; } = "none";

/// <summary>
/// Configuration for preventDefault() on key up events.
/// </summary>
public string PreventUp { get; set; } = "none";
public string PreventUp { get; init; } = "none";

/// <summary>
/// Configuration for stopPropagation() on key down events.
/// </summary>
public string StopDown { get; set; } = "none";
public string StopDown { get; init; } = "none";

/// <summary>
/// Configuration for stopPropagation() on key up events.
/// </summary>
public string StopUp { get; set; } = "none";
public string StopUp { get; init; } = "none";

/// <summary>
/// Initializes a new instance of the <see cref="KeyOptions"/> class.
Expand Down
Loading