Open
Description
Describe the Bug
Some filters either produce errors or behave in unintuitive ways.
Link to the code that reproduces this issue
https://github.com/tobiasiv/payload-reproduction/tree/filter
Reproduction Steps
- Clone the reproduction repo (branch: filter)
- Set the env variables
pnpm dev
- Go to collection Products
- Apply some filters, e.g.:
- CreatedAt "equals" current date: This returns an empty result, likely because selecting the date filter results in a different time. This behavior feels unintuitive.
- CreatedAt "is in" and "is not in": These filters always produce an error.
- CreatedAt: Changing any filter to or from "exists" produces an error.
- Categories "equals", "is not equal to": These filters always produce an error.
- Categories dropdown: The first time you open the selection dropdown, the correct suggestions are displayed. However, after switching filters, it only shows "None". This can be reset by selecting "exists" and then switching back to another filter.
- Categories: Changing any filter from "exists" causes an error, and switching to "exists" carries over the current filter value (instead of the expected default, such as "true"). For example, the number from the previous filter remains.
- Categories "is in" (multiple values): Selecting two values throws an error.
- Filter removal behavior: When adding and removing a filter, the filter area remains open. However, when values are filled out in a filter and it is removed, the filter area closes. It would be more consistent for the area to stay open in this case as well.
Which area(s) are affected? (Select all that apply)
area: core
Environment Info
Binaries:
Node: 22.13.0
npm: N/A
Yarn: N/A
pnpm: 9.7.0
Relevant Packages:
payload: 3.19.0
next: 15.1.5
@payloadcms/db-postgres: 3.19.0
@payloadcms/email-nodemailer: 3.19.0
@payloadcms/graphql: 3.19.0
@payloadcms/next/utilities: 3.19.0
@payloadcms/payload-cloud: 3.19.0
@payloadcms/richtext-lexical: 3.19.0
@payloadcms/ui/shared: 3.19.0
react: 19.0.0
react-dom: 19.0.0
Operating System:
Platform: win32
Arch: x64
Version: Windows 11 Home
Available memory (MB): 16263
Available CPU cores: 8