Postlagerkarte / blazor-dragdrop

Easy-to-use Drag and Drop Library for Blazor
MIT License
403 stars 96 forks source link

MudAutoComplete issue #136

Open nicvdb opened 2 years ago

nicvdb commented 2 years ago

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