Added support for filter using config instead of props

Signed-off-by: shmaram <shaharshmaram@gmail.com>
This commit is contained in:
shmaram
2023-12-05 17:50:28 +02:00
parent 8e1a0aa867
commit 6aa6f66e72
8 changed files with 197 additions and 15 deletions
+28
View File
@@ -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