I have a task to hide the search button if any field has a type other than Number. Here is what I implemented in Computed:
filterValid () {
return (
(this.tkType !== null) && (typeof this.tkType.value === 'number') ||
(this.archiveTk !== null) && (typeof this.archiveTk.value === 'number') ||
(this.fundTk !== null) && (typeof this.fundTk.value === 'number') ||
(this.tkStatusSend !== null) && (typeof this.tkStatusSend.value === 'number') ||
(this.tkTypeMessage !== null) && (typeof this.tkTypeMessage.value === 'number')
)
}
<v-btn
:disabled="!filterValid"
>
Search
</v-btn>
While this solution works for one select, it doesn't hide the button if the second select is invalid. Is there a way to achieve my validation using only boolean operators?