Typeahead icon indicating copy to clipboard operation
Typeahead copied to clipboard

[Question] Is there a way to programmatically select multiple items?

Open schorges opened this issue 3 years ago • 1 comments

I search for a Solution to programmatically select multiple items with an parameter eg. in AfterRender.

Change the IList not work

<BlazoredTypeahead SearchMethod="SearchEvents"
                         @bind-Values="SelectedPeople"                            
                         EnableDropDown="true"
                         placeholder="Suche Mail oder Name...">
                         
                         <SelectedTemplate Context="EmailsUsers">
                            📧 @EmailsUsers.emailAdd
                         </SelectedTemplate>
                         <HelpTemplate>
                             Mindestens 2 Zeichen zur Suche eingeben.
                         </HelpTemplate>
                         <ResultTemplate Context="EmailsUsers">
                            <div style="font-weight: 300;"> 📧 @EmailsUsers.emailAdd</div>
                            <div style="font-size: xx-small;">@EmailsUsers.name </div>
                         </ResultTemplate>
                     </BlazoredTypeahead>

schorges avatar May 30 '22 06:05 schorges

I do this with TypeAhead, by maintaining a separate List that's added to in the "ValueChanged" event, I then render these items below the TypeAhead as the selected items, with a option to remove from the list

So ends up looking like this

image

Clive321A avatar Jul 21 '22 21:07 Clive321A