UNPKG

@empathyco/x-components

Version:
288 lines (124 loc) • 4.28 kB
<!-- Do not edit this file. It is automatically generated by API Documenter. --> [Home](./index.md) &gt; [@empathyco/x-components](./x-components.md) &gt; [FacetsMutations](./x-components.facetsmutations.md) ## FacetsMutations interface Facets store mutations. **Signature:** ```typescript export interface FacetsMutations extends StatusMutations, QueryMutations, ConfigMutations<FacetsState> ``` **Extends:** [StatusMutations](./x-components.statusmutations.md)<!-- -->, [QueryMutations](./x-components.querymutations.md)<!-- -->, [ConfigMutations](./x-components.configmutations.md)<!-- -->&lt;[FacetsState](./x-components.facetsstate.md)<!-- -->&gt; ## Properties <table><thead><tr><th> Property </th><th> Modifiers </th><th> Type </th><th> Description </th></tr></thead> <tbody><tr><td> [clearStickyFilters](./x-components.facetsmutations.clearstickyfilters.md) </td><td> </td><td> () =&gt; void </td><td> Removes all the filters from the [sticky filters](./x-components.facetsstate.stickyfilters.md) record. </td></tr> <tr><td> [mutateFilter](./x-components.facetsmutations.mutatefilter.md) </td><td> </td><td> (payload: [MutateFilterPayload](./x-components.mutatefilterpayload.md)<!-- -->) =&gt; void </td><td> Updates the state of a filter. </td></tr> <tr><td> [removeFacet](./x-components.facetsmutations.removefacet.md) </td><td> </td><td> (facet: Facet) =&gt; void </td><td> Removes the facet from the [facets](./x-components.facetsstate.facets.md) record. </td></tr> <tr><td> [removeFilter](./x-components.facetsmutations.removefilter.md) </td><td> </td><td> (filter: Filter) =&gt; void </td><td> Removes the filter from the [filters](./x-components.facetsstate.filters.md) record. </td></tr> <tr><td> [removeFilters](./x-components.facetsmutations.removefilters.md) </td><td> </td><td> (filters: Filter\[\]) =&gt; void </td><td> Removes a list of filters from the [filters](./x-components.facetsstate.filters.md) record. </td></tr> <tr><td> [removeStickyFilter](./x-components.facetsmutations.removestickyfilter.md) </td><td> </td><td> (filter: RawFilter) =&gt; void </td><td> Removes the filter from the [sticky filters](./x-components.facetsstate.stickyfilters.md) record. </td></tr> <tr><td> [setFacet](./x-components.facetsmutations.setfacet.md) </td><td> </td><td> (facet: Facet) =&gt; void </td><td> Adds the facet to the [facets](./x-components.facetsstate.facets.md) record. </td></tr> <tr><td> [setFacetGroup](./x-components.facetsmutations.setfacetgroup.md) </td><td> </td><td> (facetGroupEntry: [FacetGroupEntry](./x-components.facetgroupentry.md)<!-- -->) =&gt; void </td><td> Sets the group id of the facet. </td></tr> <tr><td> [setFilters](./x-components.facetsmutations.setfilters.md) </td><td> </td><td> (filters: Filter\[\]) =&gt; void </td><td> Adds a list of filters to the [filters](./x-components.facetsstate.filters.md) record. </td></tr> <tr><td> [setOrigin](./x-components.facetsmutations.setorigin.md) </td><td> </td><td> (origin: [QueryOrigin](./x-components.queryorigin.md) \| undefined \| null) =&gt; void </td><td> Sets the origin of the module. </td></tr> <tr><td> [setParams](./x-components.facetsmutations.setparams.md) </td><td> </td><td> (params: Dictionary&lt;unknown&gt;) =&gt; void </td><td> Sets the extra params of the module. </td></tr> <tr><td> [setPreselectedFilters](./x-components.facetsmutations.setpreselectedfilters.md) </td><td> </td><td> (filters: RawFilter\[\]) =&gt; void </td><td> Adds a list of filters to the [preselectedFilters](./x-components.facetsstate.preselectedfilters.md) record. </td></tr> <tr><td> [setStickyFilter](./x-components.facetsmutations.setstickyfilter.md) </td><td> </td><td> (filter: RawFilter) =&gt; void </td><td> Adds the filter to the [sticky filters](./x-components.facetsstate.stickyfilters.md) record. </td></tr> </tbody></table>