Dropdown, DropDownDataGrid, Errors on interface inheritance

Hello, I found an issue with DropDown, DropDownDataGrid and possibly other controls when using Multiple="true" and the supplied Data is of a type that uses multiple interface inheritance. The error thrown is System.NullReferenceException: 'Object reference not set to an instance of an object.'. The location of the error is in DropDownBase.cs, Function: protected async System.Threading.Tasks.Task SelectItem(object item, bool raiseChange = true) Line: 657. "System.Reflection.PropertyInfo pi = PropertyAccess.GetElementType(Data.GetType()).GetProperty(ValueProperty);"

After Debugging your source code, I believe that the GetProperty(ValueProperty) is not recursively searching all inherited interfaces to find the ValueProperty property which will result in the variable pi being null and then failing on the subsequent line.

EX: If ValueProperty="ID" the below code will not find the ID property because it is in the IA interface and .Net reflection GetProptery() method will not flatten the hierarchy when inheriting from multiple interfaces.

public interface IA
{
  int ID { get; set; }
}

public interface IB : IA
{
  string Name { get; set; }
}

public class Test : IB
{
  public string Name {get; set}
 public int ID {get; set;}
}


\\DropDownBase.cs Master Branch pulled on Oct 5, 2021
protected async System.Threading.Tasks.Task SelectItem(object item, bool raiseChange = true)
        {
            if (!Multiple)
            {
                if (object.Equals(item, selectedItem))
                    return;

                selectedItem = item;
                if (!string.IsNullOrEmpty(ValueProperty))
                {
                    Value = PropertyAccess.GetItemOrValueFromProperty(item, ValueProperty);
                }
                else
                {
                    Value = item;
                }

                SetSelectedIndexFromSelectedItem();

                SelectedItemChanged?.Invoke(selectedItem);
            }
            else
            {
                if (selectedItems.IndexOf(item) == -1)
                {
                    selectedItems.Add(item);
                }
                else
                {
                    selectedItems.Remove(item);
                }

                if (!string.IsNullOrEmpty(ValueProperty))
                {
/* Issue is here ************************************************************************/
                    System.Reflection.PropertyInfo pi = PropertyAccess.GetElementType(Data.GetType()).GetProperty(ValueProperty);
                    Value = selectedItems.Select(i => PropertyAccess.GetItemOrValueFromProperty(i, ValueProperty)).AsQueryable().Cast(pi.PropertyType)
/****************************************************************************************/
                }
                else
                {
                    var firstElement = Data.Cast<object>().FirstOrDefault();
                    var elementType = firstElement != null ? firstElement.GetType() : null;
                    if (elementType != null)
                    {
                        Value = selectedItems.AsQueryable().Cast(elementType);
                    }
                    else
                    {
                        Value = selectedItems;
                    }
                }
            }
            if (raiseChange)
            {
                await ValueChanged.InvokeAsync(object.Equals(Value, null) ? default(T) : (T)Value);
                if (FieldIdentifier.FieldName != null) { EditContext?.NotifyFieldChanged(FieldIdentifier); }
                await Change.InvokeAsync(Value);
            }
            StateHasChanged();
        }

I hope that this post is helpful and makes sense.

Thank you kindly.