Weird behavior on DropDownDataGrid with Chips/Multiple selection enabled and using LoadData event

Hi Radzen Team,

Not sure if this is a bug or something that I didn't configure correctly.
2022-11-09_15-38-13
As you can see in the above gif image, I have the selected name tags showed on the dropdown text box with Chips set to "true" but all of the sudden the list gets changed when the filter result has someone being selected before. And it starts having some weird behaviors afterwards...

Here is the what I have in the razor file:

And OnLoadData event:

        private void OnLoadData(LoadDataArgs args)
        {
            try
            {
                var query = AdService.SearchKingstonProfileFromAzureAD(args.Filter).AsQueryable();

                // This is required for binding in RadzenDropDown component if using LoadData event
                Count = query.Count();

                if (string.IsNullOrEmpty(args.OrderBy) == false)
                {
                    query = query.OrderBy(args.OrderBy);
                }

                if (args.Skip != null)
                {
                    query = query.Skip(args.Skip.Value);
                }

                if (args.Top != null)
                {
                    query = query.Take(args.Top.Value);
                }
                
                AdUsers = query;

                InvokeAsync(StateHasChanged);
            }
            catch (Exception ex)
            {
                Message = ex.Message;
                //GenericMessageDialog.Show("Error", message);
                ShowErrorMessageDialog();
            }
        }

Maybe it is related to how filtering is applied in your case since I was not able to replicate such behavior on our demo:

No matter if there is a filter applied or not the selected items are correct:

Maybe it is related to how filtering is applied in your case since I was not able to replicate such behavior on our demo

Hmm, but the filter should only change the search result of the DataGrid, shouldn't change on the selected items... Unless the selected items somehow got changed while executing the LoadData event?

I’m afraid that I cannot comment since I’m unable to reproduce such issue.

Hi Radzen Team,

Sorry for the late reply. Is it possible to deploy the code you did for DropDownDataGrid with LoadData event and Chips/Multiple enabled to your demo page so that I can play with it?

Thanks,

bleecious

Also, after digging in more, it seems the issue has something to do with the paging. The paging result gets changed dynamically due to LoadData() event with a different filter keyword.

As you can see the following, initially I selected "Michael Dobrata," "Michael Chao," and "Michael Du" with the keyword "mich." You can see all of them showed in the first page.

However, when I changed the keyword from "mich" to "mic," @MultipleSelections somehow got changed as well. You can see the result as I switched in different pages.