@using MatrixRoomUtils.Core.Extensions
@code {
[Parameter]
public Dictionary Items { get; set; } = new();
[Parameter, EditorRequired]
public EventCallback ItemsChanged { get; set; }
[Parameter]
public Func? KeyFormatter { get; set; }
[Parameter]
public Action? OnFocusLost { get; set; }
protected override Task OnInitializedAsync()
{
Console.WriteLine($"DictionaryEditor initialized with {Items.Count} items: {Items.ToJson()}");
return base.OnInitializedAsync();
}
private void inputChanged(ChangeEventArgs obj, string key)
{
Console.WriteLine($"StringListEditor inputChanged {key} {obj.Value}");
Items[key] = obj.Value.ToString();
ItemsChanged.InvokeAsync();
}
}