Welcome toVigges Developer Community-Open, Learning,Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.2k views
in Technique[技术] by (71.8m points)

blazor - Create children of datalist by using Virtualize

I am trying to create children of datalist tag by using Virtualize to avoid creating of all items in one time but i didn't work, my code:

<div class="form-group row">
<label class="col-sm-2 col-form-label" for="organizationInput">Organisatie: </label>
<input type="text" class=" col-sm-4 form-control" id="organizationInput" list="organizationlist" @onchange="@((args) => Name= args.Value.ToString())" />
<datalist class="col-auto" id="organizationlist">
    <Virtualize Items="Organizations" Context="item">

        <ItemContent>

            <option @key="item.REL_Nummer">@item.REL_Naam01</option>

        </ItemContent>

    </Virtualize>
</datalist>
@if (SelectedOrganization != null)
{
    <label class="col-auto col-form-label">@($"Organization Name: {SelectedOrganization.REL_Naam01}")</label>
}
Please If you have an advise or I have a wrong, correct me!. question from:https://stackoverflow.com/questions/65898674/create-children-of-datalist-by-using-virtualize

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

There is right now an open issue in Github and the blazor-virtualization doesn't support select or datalist as a container, this issue will be moved to next sprint planning.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to Vigges Developer Community for programmer and developer-Open, Learning and Share
...