Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

filterOptions not applied in list view filters #10440

Open
LimChorngUan opened this issue Jan 8, 2025 · 0 comments
Open

filterOptions not applied in list view filters #10440

LimChorngUan opened this issue Jan 8, 2025 · 0 comments
Assignees

Comments

@LimChorngUan
Copy link

Describe the Bug

The filterOptions configuration is correctly applied on the create/edit view for a relationship field but is not enforced in the list view when adding filters.

Link to the code that reproduces this issue

LimChorngUan/payload-bug@inline-block-drawers-open...filterOptions

Reproduction Steps

Notes: I added a new collection MediaType which is used as a relation in Media collection, with filterOptions set to mediaType equals image. (See the code)

  1. In the MediaType collection, create the following media types: "image", "foo", "netflix"
  2. Create a new Media item. In the mediaType field, notice that only "image" is shown as expected (filtered correctly by filterOptions).
  3. Save the new Media item.
  4. Navigate to the Media list view and add a filter where mediaType equals...
  5. Observe that all MediaType options (image, foo, netflix) are displayed in the dropdown, ignoring the filterOptions configuration.

Expected Behavior:
The filterOptions should also be applied to filters in the list view, ensuring consistency across create/edit and list views.

Which area(s) are affected? (Select all that apply)

area: ui

Environment Info

Payload: 3.15.1
@LimChorngUan LimChorngUan added status: needs-triage Possible bug which hasn't been reproduced yet validate-reproduction labels Jan 8, 2025
@PatrikKozak PatrikKozak self-assigned this Jan 8, 2025
@github-actions github-actions bot removed the status: needs-triage Possible bug which hasn't been reproduced yet label Jan 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants