@using Start.Client.Store.Features.CreateGroup @using Fluxor @inherits Fluxor.Blazor.Web.Components.FluxorComponent @inject IActionSubscriber actionSubscriber @inject IDispatcher dispatch @inject IState state @if (this.state.Value.CreateGroupErrorMessage != null) { @this.state.Value.CreateGroupErrorMessage }
@if (this.state.Value.IsLoadingCreateGroup) { } else { }
@code { private BookmarkGroupDto Model { get; set; } = new("", "", 0); protected override void OnInitialized() { base.OnInitialized(); this.Model = new BookmarkGroupDto("", "", state.Value.ContainerId); // Keep the model's container ID up to date actionSubscriber.SubscribeToAction(this, (a) => this.Model.BookmarkContainerId = a.ContainerId); } protected void OnSubmit() { dispatch.Dispatch(new SubmitCreateGroupAction(this.Model)); } protected void OnDialogClose() { dispatch.Dispatch(new HideCreateGroupFormAction()); } }