fix(welcome): FlavourStep notifies host on select so Next enables immediately
WIP on local branch feat/wizard-recipes (NOT pushed) — holding per operator while more wizard changes (role app-recipes) are designed.
This commit is contained in:
@@ -37,7 +37,7 @@
|
||||
<WelcomeStep />
|
||||
break;
|
||||
case 1:
|
||||
<FlavourStep Flavours="_flavours" />
|
||||
<FlavourStep Flavours="_flavours" OnSelected="StateHasChanged" />
|
||||
break;
|
||||
case 2:
|
||||
<AccountStep OnValidityChanged="@(v => { _accountValid = v; StateHasChanged(); })" />
|
||||
|
||||
@@ -19,13 +19,19 @@
|
||||
@code {
|
||||
[Parameter] public IReadOnlyList<FlavourManifest> Flavours { get; set; } = Array.Empty<FlavourManifest>();
|
||||
|
||||
protected override void OnInitialized()
|
||||
/// <summary>Notifies the wizard host when the selection changes so it re-evaluates
|
||||
/// the Next button (otherwise Next stays disabled until a back/forward re-render).</summary>
|
||||
[Parameter] public EventCallback OnSelected { get; set; }
|
||||
|
||||
protected override async Task OnInitializedAsync()
|
||||
{
|
||||
State.Flavour ??= Flavours.FirstOrDefault(f => f.IsDefault);
|
||||
await OnSelected.InvokeAsync();
|
||||
}
|
||||
|
||||
void Select(FlavourManifest f)
|
||||
async Task Select(FlavourManifest f)
|
||||
{
|
||||
State.Flavour = f;
|
||||
await OnSelected.InvokeAsync();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user