I have an issue working on integration between Aura Component and Lightning Web Component. I have one nested Lightning Web Component in an Lightning Component.
When I try to access the child I get this exception: Cannot read property 'validity' of null
This is how I declare the Lightning Web Component and how I try to access his 'invalid' property.
console.log( 'RENDER: ' + document.querySelector("[data-name='try']").validity() );
<c:ita_ifm_lwc001_input data-name="prova" label="prova" />
And this is the Lightning Web Component js lines where I provide the method to be called by the parent.
@api invalid = false;
@api validity(){
return this.invalid;
}
Is there someone that faced this issue before? Is it possible to read child Web Component property from parent Aura Component?