Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.4k 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 Reply

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...