function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Anand Avinash DosapatiAnand Avinash Dosapati 

event.target.checked = false is not rendering

Hi All,

Expected behaviour:
upon clicking Cancel on the Lightning.confirm popup should uncheck the checkbox (lightning-input)

Current behaviour:
The checkbox remains checked. By refreshing the browser then the checkbox is unchecked.
tried with the following but no luck
event.target.checked = false;
event.detail.checked = false;



JS:
async handleShowPopUp(itemId, isChecked, dataIndex, event) {

        const result = await LightningConfirm.open({
            message: 'Are you sure you want to continue?,
            variant: 'header',
            label: 'Confirmation'
        });
        if (result) {
            event.detail.disabled = true;
            this.handleTosetCheckboxItem(itemId, isChecked);
        }
        else {
           // alert(result);
            event.target.checked = false;
            this.items[dataIndex].Checked__c = false;
        }
    }
HTML:
<lightning-layout-item class="slds-p-around_x-small" size="1">
                                <lightning-input data-id={item.Id} data-dindex={index} type="checkbox"
                                    disabled={item.milestoneDisable} variant="label-hidden" label={item.Details__c}
                                    checked={item.Checked__c} onchange={handleItemChanged}></lightning-input>
                            </lightning-layout-item>

 

Thanks inadvance