I am using a Telerik rad combo box that is populated by a query. The issue I am having is that text filtering is available on the combo box and when the user enters text in quickly part of the phrase will disappear (rarely the same amount of characters disappearing). But if the user enters the text slowly it works like normal. Its like when too much is entered too fast it clears the text input.
For example, if the user enters "Bob the robot" quickly the end result is filtering by "the robot" or "bot" or "ob the robot". I am fairly new to all this so I'm not sure where the issue could be occurring
<telerik:RadComboBox
x:Name="Items"
CanAutocompleteSelectItems="True"
IsTextSearchEnabled="True"
IsEditable="True"
DisplayMemberPath="NameAndFullAddress"
IsTabStop="False"
TextSearchMode="Contains"
IsTextSearchCaseSensitive="False"
AllowMultipleSelection="False"
OpenDropDownOnFocus="True"
SelectionChanged="Items_OnSelectionChanged"
>
private void Items_OnSelectionChanged(object sender, SelectionChangedEventArgs e)
{
var newItem = e.AddedItems.Count > 0 ? e.AddedItems[0] as NameInformation : null;
if (newItem?.NameID != ViewModel?.SelectedItemVm?.Item?.NameID)
{
if (newItem != null)
{
ViewModel?.SetSelected(newItem.NameID);
}
}
}
public IObservable<Unit> SetSelected(Guid nameId)
{
var completedUnit = new Subject<Unit>();
_collectionSourceVm
.GetLocation(nameId)
.ObserveOn(Scheduler)
.Subscribe(x =>
{
var selectedItemVm = _itemFactory.Create(x, this);
_selectedItemVm.OnNext(selectedItemVm);
_items.OnNext(!Items.Contains(selectedItemVm)?new[] {selectedItemVm}.Concat(Items).ToList():Items);
completedUnit.OnNext(Unit.Default);
});
return completedUnit;
}