Blazor SfCheckbox EnablePersistence - No ID Field

Hi,

I am using the EnablePersistence setting on many controls on my form and have given each control a unique ID that is used as they key for Local Storage.

However, the SfCheckbox component does not have an ID property and it does not get persisted, even though I set  EnablePersistence = true.

I tried populating the Name property, but this didn't work.

Can you please advise how to implement  EnablePersistence with the  SfCheckbox component?


3 Replies

YA YuvanShankar Arunagiri Syncfusion Team August 3, 2022 02:25 PM UTC

Hi Greg,


We are validating your query and will update you the details on or before 5th August 2022.


Regards,

YuvanShankar A



YA YuvanShankar Arunagiri Syncfusion Team August 26, 2022 12:36 PM UTC

Hi Greg,


We regret for the inconvenience.


We can reproduce your reported issue at our end. So, we have confirmed this as an issue and logged a bug report for this. You can also track the status of this bug by using below feedback portal link.


Feedback Link: https://www.syncfusion.com/feedback/37343/enable-persistence-was-not-working-properly-in-checkbox-component


The fix will be available in our upcoming patch release which is scheduled on 7th September 2022.


Regards,

YuvanShankar A



YA YuvanShankar Arunagiri Syncfusion Team September 15, 2022 09:39 AM UTC

Hi Greg,


We regret for the inconvenience.


we can achieve your requirement in sample level. Please refer the below code snippet for EnablePersistence for checkbox component.


@using Syncfusion.Blazor.Buttons

 

    <SfCheckBox Label="Default" @bind-Checked="isChecked" EnablePersistence="true" ID="checkbox"></SfCheckBox>

 

    @code

    {

        private bool isChecked = true;

    }


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


Regards,

YuvanShankar A


Loader.
Up arrow icon