Cannot confirm the DropDownList value with a predefined dialog

Hi,

I have a DropDownList and I want the user to confirm before changing de selected value.

Please see the repro link here : https://blazorplayground.syncfusion.com/hXLzZrjHTlXAxeel


  1. Select a value
  2. Change the value (confirm the dialog)
  3. The selected value does not change + clicking on the dropdown directly triggers the dialog so it's broken

If I disable the dialog everything is working fine.
Looks like it's bugged when combined with a predefined dialog.

Regards.

4 Replies 1 reply marked as answer

KP Kokila Poovendran Syncfusion Team February 7, 2024 10:46 AM UTC

Hi Julien Barach,


Thank you for bringing this issue regarding the DropDownList component to our attention.


We have carefully reviewed your query and made some modifications to address the problem you encountered. Please find the updated sample below attachment.


In the modified sample, we have ensured that the event handling is done within the events tag, which is the recommended approach. Additionally, we have made adjustments to resolve the issue with confirming the selected value before changing it.


Furthermore, we have prepared a video illustration for your reference, which demonstrates the changes made and the functionality of the DropDownList component with the predefined dialog.




We hope that these modifications effectively resolve the issue you encountered. If you have any further questions or concerns, please feel free to let us know. We are here to assist you. 


Attachment: BlazorServerProject_106887d2.zip


JB Julien Barach February 9, 2024 11:10 AM UTC

It doesn't work properly.

Something weird is happening with the binded value.


If you select 5, then you select 3 and click Cancel on the dialog, it looks like it's working (but it seems the value is incorrect if you check the Console.WriteLine of my sample).


Then you try to select again the same value (3), here the dialog won't appear and 3 will be the new value.


Please see the repro :

https://blazorplayground.syncfusion.com/LDBTNrjOzjsDLbgY



KP Kokila Poovendran Syncfusion Team February 12, 2024 10:27 AM UTC

Hi Email,


We have considered the reported issue When changing the dropdown value with a confirmation dialog, the @bind-Value returns incorrect data" as a bug from our end and the fix for the issue will be included with our upcoming patch release ,which is expected to be rolled out at the end of February. Now you can track the status of the reported issue through the feedback below,


Feedback Link:  https://www.syncfusion.com/feedback/50801/when-changing-the-dropdown-value-with-a-confirmation-dialog-the-bind-value-returns


Disclaimer: Inclusion of this solution in the weekly release may change due to other factors including but not limited to QA checks and works reprioritization.



KP Kokila Poovendran Syncfusion Team March 18, 2024 11:57 AM UTC

Hi Julien Barach,


We have included the fix for the issue "When changing the dropdown value with a confirmation dialog, the @bind-Value returns incorrect data" with our package version “24.2.9”. Therefore, we recommend upgrading to our latest version to resolve the current issue.

Root cause:

  • When the ItemData value is updated, the value select event is also canceled.


Release Noteshttps://blazor.syncfusion.com/documentation/release-notes/24.2.9?type=all#bug-fixes-2


Regards,

Kokila Poovendran.


Marked as answer
Loader.
Up arrow icon