[v4] Hierarchy view ignores the collection's `disableBulkDelete` / `disableBulkEdit`: bulk Edit and Delete are offered and fail with "An unknown error has occurred"

Open
#19,512 0 comments 0 reactions 1 assignee View on GitHub

Maintainers usually reply within 1 day

@JarrodMFlesch is already working on this.

Since Nov 11, 2026.

Assessment

This issue has not been assessed yet.

Description

area: ui Bug created-by: Contributor Payload OSS v3
Describe the Bug

A collection with hierarchy can set disableBulkDelete: true and disableBulkEdit: true, which "disable the bulk delete/edit operation for the collection in the admin panel and the API". The list view honours them. The hierarchy view (By Collection) doesn't: selecting two documents there still offers Edit and Delete.

The API does refuse these operations (403 Collection categories has disabled bulk delete). So in the hierarchy view, confirming Delete only shows a toast, "An unknown error has occurred."

List view, 2 selected:

list-view

Hierarchy view, 2 selected:

hierarchy-view

After Delete → Confirm:

hierarchy-delete-error

Cause.

  1. renderListView passes the collection's flags to whichever view it renders, HierarchyListView included: disableBulkDelete: collectionConfig.disableBulkDelete ?? disableBulkDelete (views/List/index.tsx#L603-L604, #L625).
  2. HierarchyListView never reads them (views/HierarchyList/index.tsx#L37-L51), and it renders HierarchyListHeader without them (#L339).
  3. HierarchyListHeader accepts both props (HierarchyListHeader/index.tsx#L24-L25), and DocumentListSelection checks them (!disableBulkEdit, !disableBulkDelete). But they always arrive as undefined.

The same applies when HierarchyListView is rendered with the props directly (both are part of ListViewClientProps). For example, a component that hosts the hierarchy view in a drawer for picking can't turn the destructive bulk actions off the way a list drawer does.

Expected: the hierarchy view hides bulk Edit/Delete when the collection (or the caller) disables them, like the list view does.

Link to the code that reproduces this issue

https://github.com/VeiaG/payload-4-reproductions/tree/repro-hierarchy-view-ignores-disable-bulk

Reproduction Steps
  1. pnpm install, then run pnpm dev in apps/next, and open /admin/collections/categories.
  2. Tick two rows. The selection bar shows only "2 selected · Select all".
  3. Switch to By Category (?view=hierarchy) and tick two rows. The selection bar shows Edit · Delete · Move.
  4. Click Delete, then Confirm. A toast says "An unknown error has occurred." and nothing is deleted.

apps/next/payload.config.ts adds:

{
  slug: 'categories',
  admin: { useAsTitle: 'title' },
  disableBulkDelete: true,
  disableBulkEdit: true,
  fields: [{ name: 'title', type: 'text', required: true }],
  hierarchy: { parentFieldName: 'parent' },
}
Which area(s) are affected?

area: ui

Environment Info
payload: 4.0.0-beta.8
@payloadcms/ui: 4.0.0-beta.8
@payloadcms/next: 4.0.0-beta.8
next: 16.4.4
react: 19.3.1
Node: 24
Dominant language
TypeScript
Stars
45.8k
Forks
4.4k
Avg merge
2d 16h
Merged PRs (30d)
251

Getting set up

Open in Codespaces

Starts the project's dev container in your browser, under your own GitHub account.

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 payloadcms/payload

All issues in payloadcms/payload

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.