I am trying to render conditionally to display child component. But it is not happening. on button click i am getting the values, but child component is not getting displayed.
<template>
<div>
<lightning-input type="text" value={checknameinputvalue} name="CheckName" label="Check Name" required onchange={handleInputChange}></lightning-input>
<lightning-button label="Generate" title="Generate" class="slds-m-left_x-small" onclick={handleClick} ></lightning-button>
<template if:true={boolgotochild}>
<c-b-c-p-contract-t-o-p check-name={checkNameValue}></c-b-c-p-contract-t-o-p>
</template>
</div>
</template>
JS -
import { LightningElement, track } from "lwc";
export default class TestcheckDetails extends LightningElement {
@track checknameinputvalue;
checkNameValue;
handleInputChange(event) {
this.checknameinputvalue = event.target.value;
console.log(event.target.value);
}
handleClick(event){
this.checkNameValue = this.checknameinputvalue;
}
get boolgotochild() {
return this.checkNameValue != null;
}
}