SfComboBox multiselectmode exception when removing selected option

Dear Team,

I'm encountering some crashes with SfComboBox, only on UWP platform on a Xamarin.Forms project.
I've created a MultiSelectMode Token combobox with a pre-selected value upon entering the page, I can freely add and remove options and saving values works correctly. When i enter the page and I try to remove the pre-selected value, on iOS and Android works correctly; on UWP it works only if I remove it with the cross on the token, if I try to remove the token with a backspace I encounter an exception that's attached lower in the message.
The list of values I'm using as a source is a List<MyClass> object, while the SelectedValue is a MyClass object (I've tried with a List<MyClass> object but no token were shown).

The current version installed on my project of Syncfusion.Xamarin is: 17.4.0.47

This is the exception:
SfComboBox.OnKeyDown (KeyRoutedEventArgs e) 
System.ArgumentNullException: Value cannot be null. Parameter name: source

This is my combobox:
<combobox:SfComboBox x:Name="multiCombo"
DataSource="{Binding MyListOfValues}"
IsEnabled="{Binding IsEnabled}"
SelectedItem="{Binding SelectedValue}"
MultiSelectMode="Token"
IsSelectedItemsVisibleInDropDown="False"
Watermark="{Binding PlaceholderValue}"
IsEditableMode="{Binding IsEditable}"
AllowFiltering="{Binding IsSearchable}"
SuggestionMode="Contains">
<combobox:SfComboBox.TokenSettings>
<combobox:TokenSettings BackgroundColor="{StaticResource FirstMainColor}"
FontSize="10"
HeightRequest="25"
TextColor="{StaticResource WhiteColor}" />
</combobox:SfComboBox.TokenSettings>

<combobox:SfComboBox.ItemTemplate>
<DataTemplate>
<StackLayout Margin="5"
Padding="5"
Orientation="Horizontal">
<Label FontAttributes="{Binding IsPlaceholder, Converter={StaticResource BoolToItalic}}"
   FontSize="12"
   HorizontalOptions="FillAndExpand"
   Text="{Binding Description}"
   TextColor="{StaticResource DarkTextColor}"
   VerticalOptions="Center" />
</StackLayout>
</DataTemplate>
</combobox:SfComboBox.ItemTemplate>
</combobox:SfComboBox> 


Regards

4 Replies 1 reply marked as answer

SS Suganya Sethuraman Syncfusion Team March 19, 2021 06:58 AM UTC

Hi DANILO,

Greetings from Syncfusion.

We have validated your query and we have prepared a sample based on the provided information to replicate the reported issue. We regret to let you know that we were not able to replicate the same.  Please have a sample for your reference,

Sample: https://www.syncfusion.com/downloads/support/directtrac/general/ze/ComboBox_Sample-793145038

Since we were not aware for your exact scenario. Could you please try our sample and let us know if you are still experiencing the same problem? If you are having same issue, please modify our sample and get back to us, or provide a video of the issue which would be helpful for us to check on it and provide you the solution as soon as possible.

Regards,
Suganya Sethuraman.
 



DL DANILO LONGONI March 25, 2021 04:22 PM UTC

Dear Suganya,

thank you so much for your help!
I managed to fix this problem in my app and it's working as intended now, I was using a "MyClass object" instead of a "List<MyClass> object" and this caused the problem.
I've managed to recreate the problem in your sample too by changing the typing of the property SelectedItem, from List<Employee> to Employee, inside the MainPage.xaml.cs file. I'll leave the modified sample attached here if you would like to have a look at it.


Regards

Attachment: ComboBox_Sample793145038_crash_a77c0736.zip


SS Suganya Sethuraman Syncfusion Team March 26, 2021 01:04 PM UTC

Hi DANILO,

Thanks for the update.

We could be able to reproduce the issue. We have fixed the reported issue. Please find the assembly from link below.

Assembly Version: 18.4.0.49

Disclaimer: Please note that we have created this patch for the version v18.4.0.49 specifically to resolve the issue reported in this incident.

Assembly: https://www.syncfusion.com/downloads/support/directtrac/general/ze/ComboAssembly17291732

Note: Please refer the below link to apply the custom assembly

https://www.syncfusion.com/kb/8279/how-to-apply-the-custom-assemblies-when-configured-the-project-with-syncfusion-nuget

Currently we have patch support only to the main and service pack release version, not for weekly NuGet release. So only provided an assembly with 18.4.0.49 version.

This fix will be included in our upcoming weekly release which is expected to rolled out on April6, 2021.

Regards,
Suganya Sethuraman.


 


Marked as answer

SS Suganya Sethuraman Syncfusion Team April 7, 2021 06:45 AM UTC

Hi DANILO,

Thanks for your patience.

We have included the fix in our latest Weekly NuGet release v19.1.0.55 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,
Suganya Sethuraman.
 


Loader.
Up arrow icon