Skip to content

Commit

Permalink
wc: Allow to disable search button using a searchActive property #TAS…
Browse files Browse the repository at this point in the history
…K-7216 #TASK-7100
  • Loading branch information
jmjuanes committed Jan 16, 2025
1 parent 6f52c68 commit 6afc3dc
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,9 @@ export default class VariantBrowserHorizontalFilter extends LitElement {
defaultFilter: {
type: Object,
},
searchActive: {
type: Boolean,
},
config: {
type: Object,
},
Expand All @@ -94,6 +97,8 @@ export default class VariantBrowserHorizontalFilter extends LitElement {
this._config = this.getDefaultConfig();

this.query = {};
this.searchActive = true;

this.queryList = [];
this.preparedQuery = {};

Expand Down Expand Up @@ -1200,7 +1205,7 @@ export default class VariantBrowserHorizontalFilter extends LitElement {
</div>
</button>
<div class="w-px bg-gray-200"></div>
<button class="btn btn-primary d-flex align-items-center gap-2" @click="${this.onSearch}">
<button class="btn btn-primary d-flex align-items-center gap-2 ${!this.searchActive ? "disabled" : ""}" @click="${this.onSearch}">
<i class="fas fa-search"></i>
<span class="fw-bold">Search</span>
</button>
Expand Down

0 comments on commit 6afc3dc

Please sign in to comment.