handleCodeChange(event) { let codeLength = event.target.value.length; if(codeLength === 6) { const selectedEvent = new CustomEvent("showvalidatebutton", { detail: { codeReceivedFromCustomer: event.target.value, codeSentToCustomer: this.completeCode.toString() } }); this.dispatchEvent(selectedEvent); } else { this.dispatchEvent(new CustomEvent('hidevalidatebutton')); } }
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter