Hello, I don't know if that's a problem with Combobox, I'm using it to do a LazyLoading search using 'ValueChanged' event from SfComboBox, so every time I tap a letter, the DataSource changes, the problem is that every time that I select an item, the popup combobox gets focused and DropDown open again (instead of keeping closed), it triggers when I select, of course because of ValueChanged event, but popup only opens if I change the DataSource from a ThreadPool.
XAML
<combobox:SfComboBox x:Name="contactComboBox"
SuggestionBoxPlacement="Auto"
IsEditableMode="True"
PopupDelay="500"
SelectedItem="{Binding Contact}"
ShowClearButton="True"
DataSource="{Binding Contacts}"
DisplayMemberPath="Name">
<combobox:SfComboBox.Behaviors>
<prism:EventToCommandBehavior EventName="ValueChanged"
Command="{Binding ContatactSearchCommand}"
CommandParameter="{Binding Text, Source={x:Reference contatactComboBox}}" />
</combobox:SfComboBox.Behaviors>
ViewModel method
That's not the method I'm using, but the exact same problem ocurrers if using it that way
private async void ContactSearch(string text)
{
Task.Run(() =>
{
Contacts = Contacts.Where(x => x.Name.Contains(text));
});
}
It also happens if using that way:
private async void ContactSearch(string text)
{
await Task.Delay(100);
Contacts = Contacts.Where(x => x.Name.Contains(text));
}
If we don't use Task.Run, the problem doesn't ocurrers
Hi Felipe,
Query: SfComboBox Popup opened When Changing DataSource in Threadpool
We are unable to replicate the reported issue on our side. We have prepared a sample for your reference. Please get it from the attachment.
If still you face any issues, please share the issue replication sample with steps to check further. It will help us to provide a better solution earlier.
Regards,
Shivani
I tried using code behind and the problem didn't happened at all, it happens if using MVVM pattern with prism.
I modified the sample to replicate the issue.
Hi Felipe,
Query: SfComboBox Popup opened When Changing DataSource in Threadpool
We have reproduced the reported issue at our end. We will let you know the details on September 1, 2022. We appreciate your patience until then.
SfComboBox has the capability to load even 100 thousand items smoothly and supports filtering the items through the AllowFiltering property, So we recommend you to directly use SfComboBox for loading and searching the items. So you can't get any dropdown issue like the reported one. If you have faced any difficulties, please let us know, and we will be here to assist you.
Regards,
Vijaykumar V
It's not possible to me to use directly SfCombobox, we have users that have thousands of contacs and the request would delay, but I found a Workaround for that problem, instead I found a problem and a very strange behavior in iOS.
When updating DataSource in iOS in ValueChanged, It causes an exception when select an item and try to scroll, and SelectedItem doesnt update, It only ocurrers in iOS.
Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
Hi Felipe,
Query: When updating DataSource in iOS in ValueChanged, It causes an exception when select an item and try to scroll, and SelectedItem doesnt update, It only ocurrers in iOS.
We have checked the provided sample in the last update, but we couldn’t able to replicate the reported issue in iOS when selecting the item from the dropdown. We have recorded a video for your reference, can you get the video and sample from the attachment?
We ask you to try our sample and if your requirement is different, please explain to us briefly and share the replication steps with the sample. It will help us to provide the proper solution at the easiest. Please let us know if you need any other details.
Regards,
Ruba Shanmugam
I could replicate the problem by using FodyPropertyChanged lib, but I don't know why this happens in iOS
Hi Felipe,
Query: I could replicate the problem by using FodyPropertyChanged lib, but I don't know why this happens in iOS.
We have prepared the sample based on the provided information using the FodyPropertyChanged with Prism, but we couldn’t able to replicate the reported issue in iOS when selecting the item from the dropdown. We have prepared a sample for your reference and get the sample from the attachment?
We ask you to try our sample and if your requirement is different, please explain to us briefly and share the replication steps with the sample. It will help us to provide the proper solution at the easiest. Please let us know if you need any other details.
Regards,
Ruba Shanmugam
I recorded the issue in iOS, I put some entries to simulate a scrollable form, there's also a sample in the archive.
Hi Felipe,
We have checked the reported issue and we could able to reproduce the issue. We have fixed the issue “Index was out of range when scrolling the view”. Please find the fixed sample with assemblies in the attachment.
Assembly version: 20.2.0.46
Please note that we have created these assemblies for version 20.2.0.46 specifically, to resolve the issue reported in this ticket. If you have received other patches for the same version for other products, please apply all patches in the order received.
Note: Please refer to the below link to apply the custom assembly
We will include the fix in our upcoming weekly release, which is scheduled to roll out on September 20, 2022.
Disclaimer: The inclusion of this solution in the weekly release may change due to other factors, including but not limited to QA checks and work reprioritization.
Regards,
Ruba Shanmugam
Hi Felipe,
Thanks for your
patience.
We have included the fix in our
latest Weekly NuGet release v20.2.0.50 which is available for download (https://www.nuget.org/ ). We thank you for your support and
appreciate your patience in waiting for this update. Please get in touch with
us if you would require any further assistance.
Regards,
Ruba Shanmugam