Skip to content

SelectedOptionChanged only response 1St. Item selection and fired twice in FluentListbox #3804

Closed
@ShingYehGit

Description

@ShingYehGit

Code

@code {
[Parameter, EditorRequired]
public EventCallback GoToSwitchTab { get; set; }

List<AskList> AskLists;
bool BAskListDisplay = false;
Ask LastAsk = null;

protected override void OnParametersSet()
{

    if (!BAskListDisplay)
    {
        string UseLingual = "zh-Hant";
        QuerySvc.TheUser.SwitchToCultue(UseLingual);
        AskLists = QuerySvc.GetDivineQuerySubject(UseLingual);
        QuerySvc.TheUser.RestoreToLastCultue();
        StateHasChanged();
        BAskListDisplay = true;
    }

}

async Task OnSelectAskChanged( Ask PickAsk )
{
    if (LastAsk != null && PickAsk == LastAsk)
        return;
    QuerySvc.SelectAsk = PickAsk;
    LastAsk = QuerySvc.SelectAsk;
    GoToSwitchTab.InvokeAsync("SelQueTab");
}

}

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs: repro code or repositoryThe provided description or code is insufficient to repro the issue

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions