Combobox sets bound value to top item on blur when nothing is selected.

We are using version 23.1.44

When nothing is selected, or the item was cleared using the 'X', and then the user clicks off of the component (on blur) the bound value is set to the top item in it's dataset, AND that item is not shown in the input. See attached screenshots.


Attachment: SF_Combobox_bug_1dcc8d8a.zip

5 Replies

KP Kokila Poovendran Syncfusion Team January 19, 2024 07:23 AM UTC

Hi Joe Piotti,


Greetings from Syncfusion Support!


Thank you for reaching out to us with the issue you are facing in version 23.1.44 regarding the Combobox setting the bound value to the top item on blur when nothing is selected.


We have thoroughly investigated your concern and attempted to replicate the issue based on the screenshots you provided. However, our attempts were unsuccessful in replicating the problem on our end. To provide you with the best assistance, we kindly request additional information from you.


Could you please share detailed replication steps for the issue you are experiencing? Additionally, if possible, a video illustration of the problem would greatly aid our understanding and help us provide a prompt solution.


In the meantime, we have created a sample for your reference: https://blazorplayground.syncfusion.com/VtrzXsWahRsboLFg


We appreciate your cooperation in resolving this matter promptly. Once we receive the requested information, we will ensure a thorough investigation and provide you with a satisfactory solution.


Video illustration: 





Regards,
Kokila Poovendran.



JP Joe Piotti January 19, 2024 02:07 PM UTC

Hello, thank you for your reply.  I went to the playground, and it looks like you are using WASM in the playground.  We are using Blazor Server.  Also, where on the playground does it say that we are using version 23.1.44?

I recorded a video of the bug that you can see here https://www.loom.com/share/5a29a6ef721f4ab6bbecfea7c15fef43?sid=931f1bfd-afbf-4ffa-a56f-c5e7e2fd3f89

I'm not sure if it matters but this project uses .Net 7
 



KP Kokila Poovendran Syncfusion Team January 22, 2024 08:18 AM UTC

Hi Joe Piotti,


After reviewing your video and the details you provided, we acknowledge the issue with version 23.1.44 in the Blazor Server environment. We sincerely apologize for any inconvenience this may have caused.


We pleased to inform you that we have already identified and addressed the reported bug. The fix is incorporated in our latest version, 24.1.44. You can refer to the release notes for more information on the bug fix: Release Notes - https://blazor.syncfusion.com/documentation/release-notes/24.1.44?type=all#bug-fixes-1


Additionally, you can find the specific feedback regarding this issue on our feedback portal: Feedback - https://www.syncfusion.com/feedback/49275/combobox-picks-first-item-from-the-datasource-after-clear-the-value-with-the-clear


To ensure a seamless experience and resolve the problem you encountered, we recommend upgrading to the latest version. This update will include the necessary fix and improvements.


If you have any further questions or encounter any difficulties during the upgrade process, please don't hesitate to reach out. We are here to assist you.


Regards,

Kokila Poovendran.


Attachment: BlazorServerProject_de510b52.zip


JP Joe Piotti January 30, 2024 02:49 PM UTC

Additional note, I found a work around that some may want to know about if they cannot immediately upgrade versions for some reason.
 
The bug only occurs if you bind to a collection of strings.  If you create a class with a single string property, then you can bind to a collection of that class, and of course use the ComboBoxFieldSettings with Text and Value properties. This method does not appear to have the bug.



KP Kokila Poovendran Syncfusion Team January 31, 2024 08:11 AM UTC

Hi Joe Piotti,


Thank you for taking the time to share your workaround regarding the issue you encountered. Your feedback is invaluable to us and to others who may encounter similar challenges.


Indeed, your workaround seems like a practical solution for those who cannot immediately upgrade versions or encounter the specific bug you mentioned. Utilizing a class with a single string property and binding to a collection of that class, along with utilizing the ComboBoxFieldSettings, appears to bypass the issue effectively.


Should you have any further insights, questions, or concerns, please feel free to reach out. We're here to assist you.


Regards,

Kokila Poovendran.


Loader.
Up arrow icon