You need to sign in to do that
Don't have an account?
Anand 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:
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