Skip to content

Filters ​

The following API functions allow developers to interact with filters. For more information on how to use these functions, see the API usage page.

pageStore ​

pageStore.getFilter(key) ​

Returns the value for a given filter

Kind: static method of pageStore

ParamTypeDescription
keyStringa filter key

pageStore.getFilterActionString(key) ​

Returns the full action string for a given filter. Useful for checking in subscriptions

Kind: static method of pageStore

ParamTypeDescription
keyStringa filter key

pageStore.getFilterDefinition(key) ​

Returns the filter object for a given filter key

Kind: static method of pageStore

ParamTypeDescription
keyStringa filter key

pageStore.getFilterProps(key) ​

returns the props for a given filter, if they exist

Kind: static method of pageStore

ParamTypeDescription
keyStringa filter key

pageStore.getLabel(key) ​

Returns the label for a given filter

Kind: static method of pageStore

ParamTypeDescription
keyStringa filter key

pageStore.getOptionsForFilter(key) ​

Returns the options array for a given filter

Kind: static method of pageStore

ParamTypeDescription
keyStringa filter key

pageStore.getLabelForOptionKey(filter, key) ​

Returns the label for a given option by key

Kind: static method of pageStore

ParamTypeDescription
filterStringa filter key
keyStringan option key for an option included in the filter

pageStore.getLabelForSelectedOption(key) ​

Returns the label for a filter's selected option

Kind: static method of pageStore

ParamTypeDescription
keyStringa filter key

pageStore.getFilterDefault(key) ​

Returns the default option for a given filter

Kind: static method of pageStore

ParamTypeDescription
keyStringa filter key

pageStore.getFilterDefaultLabel(key) ​

Returns the label for the default option for a given filter

Kind: static method of pageStore

ParamTypeDescription
keyStringa filter key

pageStore.isFilterDirty(key) ​

Returns a boolean indicating whether or not the value of state filter is equal to the value of the default. If true, the filter is no longer set to default.

Kind: static method of pageStore

ParamTypeDescription
keyStringa filter key

pageStore.areFiltersDirty() ​

Returns a boolean indicating whether or not any filters on the page have been set to a value other than their default

Kind: static method of pageStore

pageStore.getDirtyFilters() ​

Returns an array of filter keys for dirty filters

Kind: static method of pageStore

pageStore.isFilterValid(key) ​

Returns a boolean indicating whether or not the value of state filter is valid Validity is calculated using a specified valueType and/or valueValidator on the filter definition A filter with neither always returns true

Kind: static method of pageStore

ParamTypeDescription
keyStringa filter key

pageStore.setFilter(key, payload, triggerLoadData) ​

Sets a given filter's value

Kind: static method of pageStore

ParamTypeDefaultDescription
keyStringa filter key
payloadanya payload to set
triggerLoadDataBooleantrueoptional variable, if true will trigger a loadData action

pageStore.setFilterLabel(key, payload) ​

Sets a given filter's label

Kind: static method of pageStore

ParamTypeDescription
keyStringa filter key
payloadanya payload to set

pageStore.setOptionsForFilter(key, payload, setOptionToDefault) ​

Sets the options for a given filter to the array provided as payload

Kind: static method of pageStore

ParamTypeDefaultDescription
keyStringa filter key
payloadArraya payload to set
setOptionToDefaultBooleanfalseoptional variable, if true will set the filter default

pageStore.setOptionPropertyToBoolean(filter, optionKeysToSet, property, bool) ​

Set disabled property to true or false on each filter

Kind: static method of pageStore

ParamTypeDescription
filterStringa filter key
optionKeysToSetArrayan array of optionKeys
propertyStringthe name of the property
boolBooleanthe boolean value to apply to the property

pageStore.disableOptions(filter, optionKeys) ​

Set disabled property to false for given options

Kind: static method of pageStore

ParamTypeDescription
filterStringa filter key
optionKeysArrayan array of optionKeys

pageStore.enableOptions(filter, optionKeys) ​

Set disabled property to false for given options

Kind: static method of pageStore

ParamTypeDescription
filterStringa filter key
optionKeysArrayan array of optionKeys

pageStore.hideOptions(filter, optionKeys) ​

Set hidden property to true for given options

Kind: static method of pageStore

ParamTypeDescription
filterStringa filter key
optionKeysArrayan array of optionKeys

pageStore.showOptions(filter, optionKeys) ​

Set hidden property to false for given options

Kind: static method of pageStore

ParamTypeDescription
filterStringa filter key
optionKeysArrayan array of optionKeys