Using ui:inputCheckbox
with LDS for a new contact is giving me error if I don't select checkbox.
If I select the checkbox and then unselect it, it works, else it is giving an error
INVALID_TYPE_ON_FIELD_IN_RECORD
value not of required type
<ui:inputCheckbox value="{!v.object.selected__c}" />
What am I missing? If I want to pass false
to the field, I have to select and then unselect it.
Edit
from the comments:
I had tried lightning:input
typed checkbox
as well, but I faced setting it value properly; that's why I went for ui:inputCheckbox
.
force:recordData
.