Skip to content

feat: add list filters using cw relations

Arnaud Vergnet requested to merge topic/default/list-filter into branch/default

This MR adds support for filtering lists of entities using the entity' subject relations and the has_text virtual relation if any of the attributes have the fulltextindexed option set.

Sorting can be fully customized using the same approach as entities view modes. Users can order and exclude filters, enable/disable full text search, enable/disable sorting or completely overriding the filter using a custom React component.

Filters are applied as soon as the filter form changes and its state is saved to the url for "primary" lists (the list view mode). For lists included in a page (relations list in show view mode or entity selection dialogs), the state will be saved to localstorage to persist between page refreshes.

Here is an example of sorting a list in list mode:

2022-07-07_11-44-43

Filtering works on every list across the admin pages. If the list is "primary" filters will be shown automatically. If the list is included in a page the filters will be hidden by default.

Needs cubicwebjs!29 (merged)

Closes #7 (closed)

Edited by Arnaud Vergnet

Merge request reports