Skip to content

Various API Filters not showing in the UI #626

@zolex

Description

@zolex

API Platform version(s) affected: v4.0.7

Description
Many of the available Filters in api-platform/core seem to not be properly supported by the PWA.

In my example, the following SearchFilter and OrderFilter attributes with nested properties are configured for the Coffee entity:

enter image description here

The backend part works as expected, so I can order and search by the given nested properties on the API itself. Also when I manually edit the respective query params in the HydraAdmin URL, it properly shows the searched and ordered results.

Here using beans.type=/bean_types/{id}
enter image description here

And here using beans.type.name={name}
enter image description here

The actual problem seems to be in the HydraAdmin so that it does not offer the nested properties in the "Add Filter" section and also it does not show it under "Active Filters".

A similar but a bit different problem happens for the OrderFilter with nested properties: When I manually set it in the query params it works, but when clicking on the roaster-order it sends order=roaster instead of order=roaster.name

enter image description here

Another broken case is the RangeFilter.

enter image description here

It passes the filter properly to the API but does not show it under add filters or active filters.

enter image description here

How to reproduce
use this repository: https://github.com/zolex/cee-jourlly

docker compose up
docker compose exec php bin/console doctrine:database:create --no-interaction
docker compose exec php bin/console doctrine:migrations:migrate --no-interaction
docker compose exec php bin/console hautelook:fixtures:load --no-interaction

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions