Skip to content

Commit

Permalink
fix(atomic): show warning when facet displayValuesAs is not checkbox …
Browse files Browse the repository at this point in the history
…and enableExclusion is set to true (#4855)

https://coveord.atlassian.net/browse/KIT-3685

---------

Co-authored-by: GitHub Actions Bot <>
  • Loading branch information
fbeaudoincoveo authored Jan 15, 2025
1 parent 4aa0206 commit eec0326
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -299,6 +299,13 @@ export class AtomicFacet implements InitializableComponent {
'Values for both "tabs-included" and "tabs-excluded" have been provided. This is could lead to unexpected behaviors.'
);
}

if (this.displayValuesAs !== 'checkbox' && this.enableExclusion) {
console.warn(
'The "enableExclusion" property is only available when "displayValuesAs" is set to "checkbox".'
);
}

this.facet = buildFacet(this.bindings.engine, {options: this.facetOptions});
this.facetId = this.facet.state.facetId;
this.searchStatus = buildSearchStatus(this.bindings.engine);
Expand Down

0 comments on commit eec0326

Please sign in to comment.