@empathyco/x-components
Version:
Empathy X Components
28 lines (19 loc) • 2.48 kB
Markdown
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) > [@empathyco/x-components](./x-components.md) > [SearchActions](./x-components.searchactions.md)
## SearchActions interface
Search store actions.
**Signature:**
```typescript
export interface SearchActions
```
## Properties
| Property | Modifiers | Type | Description |
| --- | --- | --- | --- |
| [cancelFetchAndSaveSearchResponse](./x-components.searchactions.cancelfetchandsavesearchresponse.md) | | () => void | Cancels / interrupt [SearchActions.fetchAndSaveSearchResponse](./x-components.searchactions.fetchandsavesearchresponse.md) synchronous promise. |
| [fetchAndSaveSearchResponse](./x-components.searchactions.fetchandsavesearchresponse.md) | | (request: [InternalSearchRequest](./x-components.internalsearchrequest.md) \| null) => void | Fetches a new search response and stores them in the module state. |
| [fetchSearchResponse](./x-components.searchactions.fetchsearchresponse.md) | | (request: SearchRequest) => SearchResponse | Fetches the search response and returns them. |
| [increasePageAppendingResults](./x-components.searchactions.increasepageappendingresults.md) | | () => void | Checks if there are more pages of results to load. If there are, then increases the page number in state and set to <code>true</code> the [SearchState.isAppendResults](./x-components.searchstate.isappendresults.md) flag. |
| [resetRequestOnRefinement](./x-components.searchactions.resetrequestonrefinement.md) | | (watchedRequest: [WatchedInternalSearchRequest](./x-components.watchedinternalsearchrequest.md)<!-- -->) => void | Batches state resets in a single action after [SearchGetters.request](./x-components.searchgetters.request.md) parameters update. |
| [saveOrigin](./x-components.searchactions.saveorigin.md) | | (originInit: [QueryOriginInit](./x-components.queryorigininit.md)<!-- -->) => void | Creates a [QueryOrigin](./x-components.queryorigin.md) and saves it. |
| [saveSearchResponse](./x-components.searchactions.savesearchresponse.md) | | (response: SearchResponse) => void | Saves the [SearchResponse](./x-types.searchresponse.md)<!-- -->. |
| [setUrlParams](./x-components.searchactions.seturlparams.md) | | (urlParams: [UrlParams](./x-components.urlparams.md)<!-- -->) => void | Checks if the url has params on it and then updates the state with these values. |