Skip to content

Allow hiding the "All" tab in array insertMenu groups #3372

@jasonevines

Description

@jasonevines

Is your feature request related to a problem? Please describe.

When defining options.insertMenu.groups on an array field, the InsertMenu component always prepends a hardcoded "All" tab as the first group. There's no way to hide or suppress it.

For page builder arrays where every member type is already organized into a named group, the "All" tab adds noise without value — editors are better served by the categorized groups directly.

Describe the solution you'd like

Expose a way to hide the auto-generated "All" group, analogous to how ALL_FIELDS_GROUP (introduced in PR #10094 for document field groups) allows hidden: true on the "All fields" tab.

This could take the form of a top-level insertMenu option (e.g., showAllGroup: false) or a special constant that can be spread into the groups array with a hidden property, matching the ALL_FIELDS_GROUP precedent.

Describe alternatives you've considered

  • Custom array input component that replaces or wraps the default InsertMenu rendering to filter out the "All" tab. This works but is fragile since it depends on internal component structure.
  • Removing groups entirely eliminates the "All" tab but also loses the categorization, which defeats the purpose.

Additional context

The "All" group is prepended in InsertMenu.tsx via the useReducer initializer whenever props.groups is defined. The InsertMenuOptions type currently exposes only filter, groups, showIcons, and views.

The document field groups equivalent was resolved in sanity-io/sanity#3142 / PR #10094.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions