Checkbox value lost when popup is displayed

Hi Syncfusion Team, 

I need help with an issue I've been experiencing with the SfCheckbox. When I click on a checkbox, I intercept the onchanged event and use it to display a confirmation message to the user. For the popup, I am using Blazored Modal. As soon as the popup is displayed, the value of the checkbox seems to change back to the initial value.D

I've attached a sample project, to reproduce the error and see what it is that I'm referring to: 

 

1. Place a breakpoint in the setter of the class property BugSample.Shared.Modals.CardTypesModal.IsMarketing

2. Run the project 

2. Once the project is running, locate the side menu and on the  side menu, click 'Counter' 

3. Once you're on the counter page, click on the 'Click me' button.
4. Once the popup is displayed, click on the 'Marketing' Checkbox, as soon as one does so, a confirmation modal should popup and the breakpoint placed in the first step should be hit and the value will be changed.


Attachment: BugSample_c96a9eb3.zip

1 Reply 1 reply marked as answer

TS Thaneegairaj Sankar Syncfusion Team November 30, 2021 12:53 PM UTC

Hi Etienne,


Thank you for contacting Syncfusion support.


We have checked your reported query and we can be able to achieve your requirement in sample level. We suspect that IsMarketing property is reassigned while opening the popup, so we have modified the checkbox properties (IsMarketing, IsLifestyle) and defined a boolean in CardTypesModal.razor file. Please find the below code snippets,


CardTypesModal.razor file

         public bool? IsLifestyle = false;

         public bool? IsMarketing = false;


Counter.razor file

//parameters.Add("IsMarketing", false);

//parameters.Add("IsLifestyle", false);


For your reference, please find the below sample


Link: https://www.syncfusion.com/downloads/support/directtrac/general/ze/BugSample-1657278455


Please get back to us, if you need any further assistance on this.


Regards,

Thaneegairaj S


Marked as answer
Loader.
Up arrow icon