about summary refs log tree commit diff
path: root/MatrixUtils.Web/Shared/EditablePre.razor
blob: acb39c9757f69a4938ee82a7d4d8c50ebe361312 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
@inherits Microsoft.AspNetCore.Components.Forms.InputBase<string>
<pre id="@Id" class="@CssClass" @onkeyup="Callback" contenteditable="true">@CurrentValue</pre>

@code {

    protected override bool TryParseValueFromString(string? value, out string result, out string? validationErrorMessage) {
        result = value;
        validationErrorMessage = null;
        return true;
    }

    public object Id { get; set; }

    private Task Callback() {
        Console.WriteLine("beep");
        return Task.CompletedTask;
    }

}