payloadcms / payloadcms/payload
Filtering a hasMany relationship field by "None" returns a blank screen instead of the No results message
Open
@PatrikKozak is already working on this.
Since Apr 16, 2026.
- db: postgres
created-by: Contributor
- Dominant language
- TypeScript
- Stars
- 44.8k
- Forks
- 4.2k
- Avg merge
- 2d 21h
- Merged PRs (30d)
- 53
Description
Describe the Bug
When filtering a hasMany: true relationship field by None in the Payload admin panel list view, the filter returns a blank screen, even when documents with no related entries exist.
Link to the code that reproduces this issue
https://github.com/lcnogueira/payload-bugs-and-features/tree/bug/null-hasMany-relationship-filter
Here is a quick video showing the issue:
https://www.loom.com/share/52d3c839b28b41b699c8358459607b55
Reproduction Steps
- Clone the reproduction repo:
git clone https://github.com/lcnogueira/payload-bugs-and-features && git checkout bug/null-hasMany-relationship-filter - Start the database:
docker compose up -d - Install dependencies and run the migrations:
npm install && npm run payload migrate - start the dev server:
npm run dev - Go to
/adminand create a first user - Create a few Types entries (e.g. "Type A", "Type B")
- Create a few Posts — some with
typesvalues set, and at least one with notypesset - Go to the Posts list view in the admin panel
- Add a filter:
types→equals→None - Observe the results
Expected: Posts with no related types entries are returned.
Actual: Blank screen
Which area(s) are affected?
area: ui, db:postgres
Environment Info
Binaries:
Node: 24.0.0
npm: 11.3.0
Yarn: 1.22.19
pnpm: 10.14.0
Relevant Packages:
payload: 3.83.0
next: 15.4.11
@payloadcms/db-mongodb: 3.83.0
@payloadcms/db-postgres: 3.83.0
@payloadcms/drizzle: 3.83.0
@payloadcms/graphql: 3.83.0
@payloadcms/next/utilities: 3.83.0
@payloadcms/richtext-lexical: 3.83.0
@payloadcms/translations: 3.83.0
@payloadcms/ui/shared: 3.83.0
react: 19.2.1
react-dom: 19.2.1
Operating System:
Platform: darwin
Arch: arm64
Version: Darwin Kernel Version 24.6.0: Mon Jan 19 21:56:28 PST 2026; root:xnu-11417.140.69.708.3~1/RELEASE_ARM64_T6020
Available memory (MB): 16384
Available CPU cores: 10
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.