Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MudAutoComplete issue #136

Open
nicvdb opened this issue Feb 19, 2022 · 0 comments
Open

MudAutoComplete issue #136

nicvdb opened this issue Feb 19, 2022 · 0 comments

Comments

@nicvdb
Copy link

nicvdb commented Feb 19, 2022

Hi,
I try to make a MudAutoComplete drag-and-droppable. My app works for all other components, but I can' make it to work for the MudAutoComplete. When dragging, it changes the order of the items in the list "leden", but it doesn't change the order of the already selected items.
Sure this must be something simple to solve...

`

<MudGrid Justify="Justify.Center" Style="padding-left:2rem"> 
   
    <MudItem>
   
        <Dropzone Items="leden" >
                  
          <MudAutocomplete SearchFunc="@Search1"
                     AdornmentColor="Color.Primary">   
               
          </MudAutocomplete>  
      
        </Dropzone>                   

    </MudItem>

</MudGrid>
@code {
public List<string> leden = new List<string>()
    {
    "person1", "person2", "person3", "person4", "person5",

};



private async Task<IEnumerable<string>> Search1(string value)
{
    await Task.Delay(5);

    if (string.IsNullOrEmpty(value))
        return leden;
    return leden.Where(x => x.Contains(value, StringComparison.InvariantCultureIgnoreCase));

}

}
`

After drag and drop, the order in the list has changed, but the displayed values in the list are still at their original place.

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant