Home > widget-integration > FilterStore > getState

FilterStore.getState() method

Retrieves a specific property from the current filter state.

Signature:

getState<K extends keyof FilterStates>(key: K): FilterStates[K];

Parameters

Parameter

Type

Description

key

K

The name of the state property to retrieve

Returns:

FilterStates[K]

The current value of the specified property

Example

const requestKey = filterStore.getState('latestRequestKey');
const shortMap = filterStore.getState('shortParamsMap');