Drop Down of Objects

Dropdown (Multi)

This example makes use of a fixed list of OptionData which has a single property called Name. These are filtered within the OnLoad callback.

Item Comparer

When dealing with objects it is a good practice to set the RfDropDownMulti.ItemComparer parameter. The RfDropDownMulti uses this to determine if an item within RfDropDownMulti.Items is selected. By default the ItemComparer is set to:

(i1, i2) => i1?.Equals(i2)

The only time the ItemComparer does not have to be set with an object is when the list of options stays the same. That would then allow the equals reference check to come back as true.

This still works because the value of SelectedItems and AllOptions are never changing and the comparison is a reference comparison.

An unhandled error has occurred. Reload 🗙