@using Start.Client.Components.Shared @using Start.Client.Store.Features.CreateGroup @using Fluxor @inherits Fluxor.Blazor.Web.Components.FluxorComponent @inject IActionSubscriber actionSubscriber @inject IDispatcher dispatch @inject IState state
Create Bookmark Group
@if (this.state.Value.CreateGroupErrorMessage != null) { @this.state.Value.CreateGroupErrorMessage }
@if (this.state.Value.IsLoadingCreateGroup) { } else { }
@code { private BookmarkGroupDto Model { get; set; } = new("", "", 0, 0); protected override void OnInitialized() { base.OnInitialized(); this.Model = new BookmarkGroupDto("", "", 0, 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()); } }