In Step 1 on an Omniscript, I have two text elements: "neighborhood" and "city".
There is also the "Search" button made in LWC. I need it to be disabled only if the fields "neighborhood" OR "city" are empty, but I'm not getting it... Can anyone help me? Here's what I tried to do initially:
searchButtonLWC.html
<template>
<div>
<lightning-button
variant="destructive"
label="Search"
onclick={handleClick}
disabled={disableButton}
class="slds-m-vertical_medium">
</lightning-button>
</div>
</template>
searchButtonLWC.js
import { LightningElement, api} from 'lwc';
import { OmniscriptActionCommonUtil } from "vlocity_cmt/omniscriptActionUtils";
import { getNamespaceDotNotation } from "vlocity_cmt/omniscriptInternalUtils";
import { OmniscriptBaseMixin } from 'vlocity_cmt/omniscriptBaseMixin';
export default class searchButtonLWC extends OmniscriptBaseMixin(LightningElement) {
@api neighborhood;
@api city;
_ns = getNamespaceDotNotation();
_actionUtilClass;
connectedCallback() {
this._actionUtil = new OmniscriptActionCommonUtil();
}
handleClick() {
}
get requiredFieldsFilled(){
return (this.neighborhood && this.city);
}
disableButton(){
return !(this.requiredFieldsFilled());
}
}

