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)
- .getFilterActionString(key)
- .getFilterDefinition(key)
- .getFilterProps(key)
- .getLabel(key)
- .getOptionsForFilter(key)
- .getLabelForOptionKey(filter, key)
- .getLabelForSelectedOption(key)
- .getFilterDefault(key)
- .getFilterDefaultLabel(key)
- .isFilterDirty(key)
- .areFiltersDirty()
- .getDirtyFilters()
- .isFilterValid(key)
- .setFilter(key, payload)
- .setFilterLabel(key, payload)
- .setOptionsForFilter(key, payload, setOptionToDefault)
- .setOptionPropertyToBoolean(filter, optionKeysToSet, property, bool)
- .disableOptions(filter, optionKeys)
- .enableOptions(filter, optionKeys)
- .hideOptions(filter, optionKeys)
- .showOptions(filter, optionKeys)
pageStore.getFilter(key)
Returns the value for a given filter
Kind: static method of pageStore
Param | Type | Description |
---|---|---|
key | String | a filter key |
pageStore.getFilterActionString(key)
Returns the full action string for a given filter. Useful for checking in subscriptions
Kind: static method of pageStore
Param | Type | Description |
---|---|---|
key | String | a filter key |
pageStore.getFilterDefinition(key)
Returns the filter object for a given filter key
Kind: static method of pageStore
Param | Type | Description |
---|---|---|
key | String | a filter key |
pageStore.getFilterProps(key)
returns the props for a given filter, if they exist
Kind: static method of pageStore
Param | Type | Description |
---|---|---|
key | String | a filter key |
pageStore.getLabel(key)
Returns the label for a given filter
Kind: static method of pageStore
Param | Type | Description |
---|---|---|
key | String | a filter key |
pageStore.getOptionsForFilter(key)
Returns the options array for a given filter
Kind: static method of pageStore
Param | Type | Description |
---|---|---|
key | String | a filter key |
pageStore.getLabelForOptionKey(filter, key)
Returns the label for a given option by key
Kind: static method of pageStore
Param | Type | Description |
---|---|---|
filter | String | a filter key |
key | String | an 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
Param | Type | Description |
---|---|---|
key | String | a filter key |
pageStore.getFilterDefault(key)
Returns the default option for a given filter
Kind: static method of pageStore
Param | Type | Description |
---|---|---|
key | String | a filter key |
pageStore.getFilterDefaultLabel(key)
Returns the label for the default option for a given filter
Kind: static method of pageStore
Param | Type | Description |
---|---|---|
key | String | a 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
Param | Type | Description |
---|---|---|
key | String | a 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
Param | Type | Description |
---|---|---|
key | String | a filter key |
pageStore.setFilter(key, payload)
Sets a given filter's value
Kind: static method of pageStore
Param | Type | Description |
---|---|---|
key | String | a filter key |
payload | any | a payload to set |
pageStore.setFilterLabel(key, payload)
Sets a given filter's label
Kind: static method of pageStore
Param | Type | Description |
---|---|---|
key | String | a filter key |
payload | any | a 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
Param | Type | Default | Description |
---|---|---|---|
key | String | a filter key | |
payload | Array | a payload to set | |
setOptionToDefault | Boolean | false | optional 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
Param | Type | Description |
---|---|---|
filter | String | a filter key |
optionKeysToSet | Array | an array of optionKeys |
property | String | the name of the property |
bool | Boolean | the boolean value to apply to the property |
pageStore.disableOptions(filter, optionKeys)
Set disabled property to false for given options
Kind: static method of pageStore
Param | Type | Description |
---|---|---|
filter | String | a filter key |
optionKeys | Array | an array of optionKeys |
pageStore.enableOptions(filter, optionKeys)
Set disabled property to false for given options
Kind: static method of pageStore
Param | Type | Description |
---|---|---|
filter | String | a filter key |
optionKeys | Array | an array of optionKeys |
pageStore.hideOptions(filter, optionKeys)
Set hidden property to true for given options
Kind: static method of pageStore
Param | Type | Description |
---|---|---|
filter | String | a filter key |
optionKeys | Array | an array of optionKeys |
pageStore.showOptions(filter, optionKeys)
Set hidden property to false for given options
Kind: static method of pageStore
Param | Type | Description |
---|---|---|
filter | String | a filter key |
optionKeys | Array | an array of optionKeys |