Constructor
# private new Filter(filters, resource)
Parameters:
Name | Type | Description |
---|---|---|
filters |
Object.<String, (Object|String)>
|
selected filters |
resource |
BaseResource
|
resource which is filtered |
Classes
Methods
# static normalizeKeys(filters) → {Object}
Changes raw nested filters to form Object.
Parameters:
Name | Type | Description |
---|---|---|
filters |
Object
|
Object
Example
const filters = {
nested: {field: 'ala'},
'dataField~~from': '2019-08-14'
}
const normalized = Filter.normalizeFilters(filters)
// {
// 'nested.filter': 'ala',
// 'dataField': {from: '2019-08-14'}
// }
# get(key) → {Filter.Property|undefined}
Returns filter for a given property key
Parameters:
Name | Type | Description |
---|---|---|
key |
String
|
property key |
Filter.Property
|
undefined