Added support for filter using config instead of props
Signed-off-by: shmaram <shaharshmaram@gmail.com>
This commit is contained in:
@@ -325,6 +325,34 @@ export default app.createRoot(
|
||||
);
|
||||
```
|
||||
|
||||
You can filter the items that are shown in the component.
|
||||
this can be done by using the config file.
|
||||
Filtering is done by using 3 parameters:
|
||||
|
||||
- `field` - define which field to filter. can be one of the following
|
||||
- id: string;
|
||||
- name: string;
|
||||
- pathname: string;
|
||||
- hits: number;
|
||||
- timestamp: number;
|
||||
- entityRef?: string;
|
||||
- `operator` - can be one of the following `'<' | '<=' | '==' | '!=' | '>' | '>=' | 'contains'`
|
||||
- `value` - the value of the filter
|
||||
|
||||
```yaml
|
||||
home:
|
||||
recentVisits:
|
||||
filterBy:
|
||||
- field:
|
||||
operator:
|
||||
value:
|
||||
topVisits:
|
||||
filterBy:
|
||||
- field:
|
||||
operator:
|
||||
value:
|
||||
```
|
||||
|
||||
## Contributing
|
||||
|
||||
### Homepage Components
|
||||
|
||||
Reference in New Issue
Block a user