Skip to content

Filtering a hasMany relationship field by "None" returns a blank screen instead of the No results message #16292

@lcnogueira

Description

@lcnogueira

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

  1. Clone the reproduction repo: git clone https://github.com/lcnogueira/payload-bugs-and-features && git checkout bug/null-hasMany-relationship-filter
  2. Start the database: docker compose up -d
  3. Install dependencies and run the migrations: npm install && npm run payload migrate
  4. start the dev server: npm run dev
  5. Go to /admin and create a first user
  6. Create a few Types entries (e.g. "Type A", "Type B")
  7. Create a few Posts — some with types values set, and at least one with no types set
  8. Go to the Posts list view in the admin panel
  9. Add a filter: typesequalsNone
  10. 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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions