Skip to content

feat: add "Clear" action to Array and Blocks fields#16948

Open
zawoj wants to merge 1 commit into
payloadcms:mainfrom
zawoj:feat/clear-array-blocks-fields
Open

feat: add "Clear" action to Array and Blocks fields#16948
zawoj wants to merge 1 commit into
payloadcms:mainfrom
zawoj:feat/clear-array-blocks-fields

Conversation

@zawoj

@zawoj zawoj commented Jun 9, 2026

Copy link
Copy Markdown

Adds a dedicated "Clear" button to Array and Blocks field headers, allowing users to quickly remove all rows or blocks with a single click. This significantly improves the user experience for clearing fields that previously required manual, row-by-row deletion.

The "Clear" button is contextually displayed only when the field contains rows, is not read-only, and is not disabled. The action efficiently clears all field data, including nested subfields, via a new CLEAR_ROWS action in the form reducer.

Adds a dedicated "Clear" button to Array and Blocks field headers, allowing users to quickly remove all rows or blocks with a single click. This significantly improves the user experience for clearing fields that previously required manual, row-by-row deletion.

The "Clear" button is contextually displayed only when the field contains rows, is not read-only, and is not disabled. The action efficiently clears all field data, including nested subfields, via a new `CLEAR_ROWS` action in the form reducer.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant