Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Filter by relation's property

Open
#344 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
38/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
react, typescript
Domain
frontend

Research direction

No files or tests are named in the report. Reproduce the issue in the admin filter UI using the shown SearchFilter configuration and inspect how the hydra:search mappings are consumed; done means the relation property appears as a usable filter in the admin page.

Written by the indexing model from the issue text.

Description

API Platform version(s) affected: 2.2.3 , 2.4.2

Description
I need to filter (SearchFilter) a resource with one of its association property. But in the filters in the admin page, I can see only the mobileNumber option.

How to reproduce
The documentation says it should be done with something like this:

 * @ApiFilter(SearchFilter::class, properties={
 *     "mobileNumber": "partial",
 *     "label.title": "exact",
 * })

here is the hydra:search section of the response 👇:skin-tone-2:

hydra:search: {@type: "hydra:IriTemplate", hydra:template: "/users{?mobileNumber,label.title,label.title[]}",…}
    @type: "hydra:IriTemplate"
    hydra:mapping: [{@type: "IriTemplateMapping", variable: "mobileNumber", property: "mobileNumber", required: false},…]
        0: {@type: "IriTemplateMapping", variable: "mobileNumber", property: "mobileNumber", required: false}
            @type: "IriTemplateMapping"
            property: "mobileNumber"
            required: false
            variable: "mobileNumber"
        1: {@type: "IriTemplateMapping", variable: "label.title", property: "label.title", required: false}
            @type: "IriTemplateMapping"
            property: "label.title"
            required: false
            variable: "label.title"
        2: {@type: "IriTemplateMapping", variable: "label.title[]", property: "label.title", required: false}
            @type: "IriTemplateMapping"
            property: "label.title"
            required: false
            variable: "label.title[]"
        hydra:template: "/users{?mobileNumber,label.title,label.title[]}"
        hydra:variableRepresentation: "BasicRepresentation"
Dominant language
TypeScript
Stars
516
Forks
134
PR merge metrics
No merged PRs in 30d

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from api-platform/admin

All issues in api-platform/admin

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.