-
How can i binding event by condition? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
Edit: See @sorvell 's answer below. |
Beta Was this translation helpful? Give feedback.
-
You can do this easily by putting the condition in the handler:
See: https://lit.dev/playground/#gist=e1b79a1e5d0d492445cee0288f1fca4c |
Beta Was this translation helpful? Give feedback.
You can do this easily by putting the condition in the handler:
<button @click=${this.shouldHandleClick && this.handleClick}>...
See: https://lit.dev/playground/#gist=e1b79a1e5d0d492445cee0288f1fca4c