Skip to content

Commit

Permalink
🐛 fix: Variable cannot be filled in (#581)
Browse files Browse the repository at this point in the history
  • Loading branch information
wzh425 authored Jul 24, 2024
1 parent 1d2a71e commit 6358a60
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
// Copyright (c) MASA Stack All rights reserved.
// Licensed under the Apache License. See LICENSE.txt in the project root for license information.

using System.Collections.Concurrent;

namespace Masa.Mc.Web.Admin.Pages.MessageTasks.Modules;

public partial class MessageVariables : AdminCompontentBase
Expand All @@ -16,12 +14,13 @@ public partial class MessageVariables : AdminCompontentBase
[Parameter]
public bool ReadOnly { get; set; }


private List<ItemDto> _items = new();

protected override void OnParametersSet()
protected async override Task OnInitializedAsync()
{
_items = Value.Select(x => new ItemDto(x.Key, x.Value?.ToString() ?? string.Empty)).ToList();

await base.OnInitializedAsync();
}

public async Task HandleChangeAsync()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ protected async override Task OnInitializedAsync()

I18n.CultureChanged += Changed;
}

protected async override Task OnAfterRenderAsync(bool firstRender)
{
if (firstRender)
Expand Down

0 comments on commit 6358a60

Please sign in to comment.