Skip to content

[tree] Add Tree and TreeGrid components - #6212

Open
flaviendelangle wants to merge 92 commits into
mui:masterfrom
flaviendelangle:tree
Open

flaviendelangle wants to merge 92 commits into
mui:masterfrom
flaviendelangle:tree

Conversation

@flaviendelangle

@flaviendelangle flaviendelangle commented Nov 10, 2026 •

Copy link
Copy Markdown
Member

Preview: https://deploy-preview-6212--base-ui.netlify.app/react/components/tree and https://deploy-preview-6212--base-ui.netlify.app/react/components/tree-grid

Experiments with columns: document outline and account hierarchy

Work on #3327.

Adds two components that share one implementation:

  • Tree follows the tree view pattern: the list is a tree, and each item is a treeitem that the keyboard focuses as one element.
  • TreeGrid follows the treegrid pattern: each item is a row of one or more cells, which hold values and controls the keyboard reaches: buttons, inputs, links, checkboxes.

Both take the same root props (items, expansion, selection, actionsRef, transactions) and share filtering, status messages, group transitions, and the item decorations.

Usage

A basic tree:

import { Tree } from '@base-ui/react/tree';

<Tree.Root items={items} defaultExpandedItems={['documents']}>
  <Tree.Label>Files</Tree.Label>
  <Tree.List>
    {(item) => (
      <Tree.Item itemId={item.id}>
        <Tree.ItemExpansionTrigger />
        {item.label}
      </Tree.Item>
    )}
  </Tree.List>
</Tree.Root>;

Checkbox selection, where the item itself is the checkbox (aria-checked, mixed for a partly selected branch):

<Tree.Root items={items} selectionMode="multiple">
  <Tree.List aria-label="Files">
    {(item) => (
      <Tree.CheckboxItem itemId={item.id}>
        <Tree.CheckboxItemIndicator />
        <Tree.ItemExpansionTrigger />
        {item.label}
      </Tree.CheckboxItem>
    )}
  </Tree.List>
</Tree.Root>;

A navigation tree, where the item is the link, as in the APG navigation tree view:

<Tree.Root items={pages} selectionMode="none">
  <Tree.List aria-label="Documentation">
    {(page) => (
      <Tree.LinkItem itemId={page.id} href={page.href} active={page.id === currentPageId}>
        {page.label}
      </Tree.LinkItem>
    )}
  </Tree.List>
</Tree.Root>;

Rows with controls:

import { TreeGrid } from '@base-ui/react/tree-grid';

<TreeGrid.Root items={tasks}>
  <TreeGrid.Table aria-label="Tasks">
    {(task) => (
      <TreeGrid.Row itemId={task.id}>
        <TreeGrid.Cell>
          <TreeGrid.RowCheckbox />
          <TreeGrid.CellLink href={task.url}>{task.label}</TreeGrid.CellLink>
          <TreeGrid.CellInput aria-label={`Estimate for ${task.label}`} />
          <TreeGrid.CellButton aria-label={`Remove ${task.label}`}>
            <RemoveIcon />
          </TreeGrid.CellButton>
        </TreeGrid.Cell>
      </TreeGrid.Row>
    )}
  </TreeGrid.Table>
</TreeGrid.Root>;

Columns, named by a header row:

<TreeGrid.Root items={files}>
  <TreeGrid.Table aria-label="Files">
    <TreeGrid.HeaderRow>
      <TreeGrid.HeaderCell>Name</TreeGrid.HeaderCell>
      <TreeGrid.HeaderCell>Size</TreeGrid.HeaderCell>
    </TreeGrid.HeaderRow>
    <TreeGrid.Collection>
      {(file) => (
        <TreeGrid.Row itemId={file.id}>
          <TreeGrid.Cell>
            <TreeGrid.RowExpansionTrigger />
            {file.label}
          </TreeGrid.Cell>
          <TreeGrid.Cell>{file.size}</TreeGrid.Cell>
        </TreeGrid.Row>
      )}
    </TreeGrid.Collection>
  </TreeGrid.Table>
</TreeGrid.Root>;

Filtering comes from a provider that wraps either root, so trees without it don't bundle the filter:

<Tree.FilterProvider>
  <Tree.Root items={items}>
    <Tree.Input aria-label="Filter files" />
    <Tree.List aria-label="Files">{renderItem}</Tree.List>
    <Tree.Empty>No files found.</Tree.Empty>
  </Tree.Root>
</Tree.FilterProvider>;

Notes

Why two components

A tree item is one focusable element that screen readers read as a whole, so it can't hold controls the keyboard reaches. A treegrid row can, through its cells. The two patterns need different markup (TreeGrid.Cell is the cell, and the controls are parts inside it) and different keyboard models, so each gets its own component, as Base UI does with one primitive per accessibility pattern.

TreeGrid is named after the pattern. It covers trees whose rows carry controls, in one column or several, but not tabular data: it doesn't sort, resize, edit or page through its rows, and the docs point to a data grid for those.

Each part belongs to one component. A grid part in a Tree.Root (<TreeGrid.CellButton>, <TreeGrid.Cell>, …) or a tree part in a TreeGrid.Root (<Tree.CheckboxItem>, <Tree.LinkItem>) throws an error that names the part to use instead.

Why Tree.CheckboxItem and TreeGrid.RowCheckbox both exist

In a Tree, the item is the checkbox: it reports aria-checked, a click toggles it, and Shift+click selects a range. In a TreeGrid, the checkbox is a control inside a cell, next to the others. The same split gives Tree.LinkItem (the item is the link) and TreeGrid.CellLink (a link inside a cell).

Why TreeGrid uses table names

TreeGrid.Table is the treegrid, TreeGrid.Row the row that takes focus and carries the selection, level and expansion, and TreeGrid.Cell a gridcell. Screen readers don't read content placed directly in a row, so it needs a cell (the tree grid warns when a row renders none). The row is named after its item, so a focused row announces only its label. A cell takes its name from its content, which keeps the visible text of its controls in it, as WCAG 2.5.3 (label in name) requires.

The parts that act on the row take a Row prefix (RowCheckbox, RowExpansionTrigger, RowIndentGuide, RowGroupIndicator), and the controls a Cell prefix (CellButton, CellInput, CellLink, CellControl), since TreeGrid.Input is already the filter input shared with Tree. The data keeps its names: items, itemId, createItems.

The header row has to sit inside the treegrid element, so TreeGrid.Table takes either the row render function, or the header row and TreeGrid.Collection, which renders the rows without an element of its own. That's the split Combobox.List and Combobox.Collection already make.

How the keyboard moves through columns

  • Arrow Right on a row enters it, and Arrow Left and Arrow Right move between its stops: every control, as before, and in a row of several cells, every cell without a control, so screen readers read each value with its column header. A cell only takes tabindex while the keyboard is on it, so a click on its text still focuses the row.
  • In a row of several cells, Arrow Up and Arrow Down stay in the column, on the control at the same position in the cell, and Ctrl+Home and Ctrl+End move to the first or last row of the column, as the treegrid pattern describes. In a row of a single cell, they still move to the next row: the controls of one cell aren't aligned by meaning, so landing on "the same position" could put a different action under the same keystroke.
  • Controls keep the keys they declare: popup triggers keep Arrow Up and Arrow Down to open, and text inputs keep the caret keys.
  • In development, the tree grid warns when rows of several cells have no TreeGrid.HeaderCell, and when a row renders a different number of cells than the header row.

Why items are data rendered by Tree.List and TreeGrid.Table, not nested JSX

Unlike Menu or Accordion, both components read their hierarchy from items, and render each row with a function. Keyboard navigation, select all, selection propagation, filtering and applyTransaction() need every item, including the ones inside collapsed folders that never mount. Rows render as flat siblings with aria-level, like the APG examples.

Why tree grid controls are dedicated parts

Like Toolbar.Button, Toolbar.Input and Toolbar.Link join the toolbar's roving focus, TreeGrid.CellButton, TreeGrid.CellInput, TreeGrid.CellLink and TreeGrid.CellControl register with their row. The arrow keys then move between the row and its controls, and the keys a control needs, such as the arrows in a text input, stay with it. Other elements join through render, as with Toolbar.

Why a row click doesn't select the descendants

In multiple selection, clicking a Tree.Item row selects only that row, while checking a Tree.CheckboxItem or a TreeGrid.RowCheckbox also selects its descendants (checkboxSelectionPropagation). Libraries split on this:

Details and sources are in this survey.

Follow-up

Benchmarks

Headless Tree View

Design Systems

Specialized Libraries

No Tree Component

Radix (React), Headless UI (Tailwind), daisyUI, NextUI, TanStack, Evergreen

Known issues

No warning when touch screen readers can't expand a tree grid row

Touch screen readers can't press arrow keys, so iOS VoiceOver and TalkBack users expand a row through RowExpansionTrigger. The docs ask for it, but nothing warns when an expandable row renders no trigger and expandOnClick is off. Chromium's source suggests it matters for TreeGrid: Blink turns TalkBack's Expand action into an arrow key only for treeitem, and into a click for other roles (ax_object.cc), so on a treegrid row it would select instead of expanding. A Tree item is a treeitem, so it isn't affected. That's inferred from the source, not tested. React Aria warns in development in this case (Tree.tsx). Decide after a screen reader pass on a phone whether TreeGrid should warn too.

Screen readers don't hear which items match the filter

Items are named after their label with aria-label, so screen readers don't read data-filter-match or anything else inside a row. While filtering, a user can't tell a match from an ancestor kept for context, or from the other items in the modes that keep every item; Tree.Status only announces the number of results. None of the libraries with built-in filtering solves this: Trees.software, PrimeReact, Ant Design, AG Grid, the MUI X Data Grid, react-arborist and jsTree mark matches only visually, or not at all. The closest is VS Code, whose arrow keys land only on matches while its find widget is open (abstractTree.ts). We don't copy that, since the APG tree pattern moves through every visible item. The filtering demos describe matches with aria-description="Match" instead, and the docs ask for the same. A built-in description would need a translatable string merged with the developer's own description, so it can wait until users ask for it.

TreeGrid should support selectionMode="none"

We removed selectedMode="none" and aligned the DX of the Tree with Select / ListBox and Combobox (with a multiple prop).
But this use case does make sense on the TreeGrid, we need to add it back.

🤖 Generated with Claude Code

flaviendelangle and others added 2 commits November 10, 2026 15:54
Ports the Tree from mui/base-ui-plus#4. Being in the same package as the
internals it builds on lets it drop the pieces Plus needed to work from the
outside:

- Base UI's `useInitialLiveRegionTextMutation`, `DEFAULT_FIELD_ROOT_CONTEXT`,
  `warn` and `error` replace the Plus copies.
- The composed-tree helpers of `tabbable.ts` replace the Tree's copies.
- The built-in labels and status messages are English, like Toast's, and
  `aria-label` or the status `children` function translate them, as Base UI
  has no localization provider.
- The CSS Modules demos inline their colors, and the demo color lint rule
  accepts system colors in forced colors mode.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@flaviendelangle flaviendelangle added the type: new feature Expand the scope of the product to solve a new problem. label Nov 10, 2026
@pkg-pr-new

pkg-pr-new Bot commented Nov 10, 2026 •

Copy link
Copy Markdown

commit: 67a29bb

@netlify

netlify Bot commented Nov 10, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for base-ui ready!

Name Link
🔨 Latest commit 12c3610
🔍 Latest deploy log https://app.netlify.com/projects/base-ui/deploys/6b0988d4c1eea4a86b6cad0b
😎 Deploy Preview https://deploy-preview-6212--base-ui.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@code-infra-dashboard

code-infra-dashboard Bot commented Nov 10, 2026 •

Copy link
Copy Markdown

Bundle size

Bundle Parsed size Gzip size
@base-ui/react 🔺+106KB(+20.45%) 🔺+31.9KB(+19.02%)

Details of bundle changes

Performance

No regressions in 36 benchmarks · precise to ±8.8% (±14.6% at worst) · ran 3m 12s · details


Check out the code infra dashboard for more information about this PR.

`stripInternal` removed `InternalTreeItemCollection` while other declarations
still referenced it, which broke the public types check.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@flaviendelangle
flaviendelangle marked this pull request as ready for review November 10, 2026 15:36
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
flaviendelangle and others added 3 commits November 19, 2026 16:41
The tree now follows the tree view pattern by default: the list is a
`tree` and each item a `treeitem`, read as one element.
`Tree.GridProvider` opts into the treegrid pattern for items that hold
controls the keyboard reaches. It installs the grid plugin, which owns
the control registry and the in-row navigation moved out of the
interaction plugin, so plain trees don't bundle it.

- `Tree.ItemContent`, `Tree.ItemButton`, `Tree.ItemInput`,
  `Tree.ItemLink` and `Tree.ItemControl` throw outside the provider.
- Outside a grid, `Tree.ItemCheckbox` stays out of the tab sequence
  and returns focus to its item, including after a label click.
- Docs demos use plain trees, except item controls and links.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The Tree and the tree whose items hold controls follow different
accessibility patterns and need different markup, so each is its own
component, built on the same store and plugins.

- `Tree` follows the tree view pattern. `Tree.CheckboxItem` (with
  `Tree.CheckboxItemIndicator`) is an item that toggles like a checkbox
  and reports `aria-checked`, and `Tree.LinkItem` is an item rendered as
  a link, as in the APG navigation tree view.
- `ActionTree` follows the treegrid pattern with one cell per item. Its
  root installs the grid navigation, and the cell and control parts move
  from `Tree` to `ActionTree.ItemContent`, `ItemCheckbox`,
  `ItemCheckboxIndicator`, `ItemButton`, `ItemInput`, `ItemLink` and
  `ItemControl`. It's not called TreeGrid, a name other libraries use for
  multi-column tree tables.
- `Tree.GridProvider` is removed. A part of one component throws in the
  other's root, naming the part to use instead.
- The Tree docs cover the plain tree, and a new Action Tree page covers
  controls inside items, each with its own demos.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
An `aria-label` on the cell left out the visible text of the controls
inside it, which fails label in name (WCAG 2.5.3): axe reported
`label-content-name-mismatch` for a cell holding a "Delete" button.
The row keeps its name, as in the APG treegrid example and React Aria.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@flaviendelangle flaviendelangle changed the title [tree] Add Tree component [tree] Add Tree and ActionTree components Nov 19, 2026
flaviendelangle and others added 10 commits November 20, 2026 09:42
A tree inside its own scroll container scrolled only that container to
the focused row. When the container ran past the window, arrow keys moved
focus to rows below the fold. While the row has focus, also reveal it in
every scroller around the container, up to the page.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A trigger rendered in a Tree.LinkItem sits inside the anchor, so a click
expanded the item and also followed the link.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ItemControl ignored a disabled item or tree. A rendered Switch still
toggled while the row told assistive tech it was disabled. ItemControl
now forwards `disabled` to the rendered element and exposes it in its
state and as `data-disabled`, like the other control parts.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Email and number inputs don't expose their caret, so the tree couldn't
tell when it reached an edge and took Left and Right from them on every
press. They now keep the arrows, like other non-text inputs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
`disabled` isn't a `<div>` attribute, so the forwarded props failed to
typecheck against the default element.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Give the action tree checkbox, switch, Remove buttons and new-tab link
  24px hit areas, like the expansion trigger, and keep the checkbox and
  trigger hit areas apart.
- Darken the service traffic rate so it passes contrast on selected and
  hovered rows, and describe each row with its rate.
- Show a contrasting inner focus ring on the active link item.
- Keep the switch state and the filter input focus ring visible in
  forced colors.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Revealing a focused row in the page went through `scrollIntoViewIfNeeded`,
which sums `offsetTop` values and ignores how far the tree's own scroller
is scrolled. After End in a scrolled list, it scrolled the page toward the
row's unscrolled position and moved the tree off screen. The page now uses
the same live-rect math as the inner containers, with the viewport as its
scrollport.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
With `scroll-behavior: smooth` on the tree's scroller, assigning
`scrollTop` starts an animation, so the page pass measured the row before
it moved and scrolled the page past it. Each container now reports how
far it will move the row, and the outer ones subtract that distance.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The previous change returned the whole distance each container scrolled,
so after an instant scroll the page pass subtracted a move the row's live
position already showed, and scrolled the page away from it. Return only
what's left after reading the position back.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
flaviendelangle and others added 30 commits November 27, 2026 09:53
`@base-ui/react/tree-grid` exported its root-level types only in the
`TreeGrid` namespace, so the generated reference printed the Tree names
behind them, such as `TreeRootActions`, which the package doesn't export.
It now re-exports them under flat TreeGrid names, as it already does for
the part props and states, and the reference prints `TreeGrid.Root.Actions`
and the other namespace names.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
`Tree.Item` said a click deselects the other items, which isn't true with
`multiple`. `Tree.CheckboxItem` said it leaves the other items selected,
which isn't true in single selection. `Tree.List` said it renders all the
items at once, but it renders only the ones in view. The summaries now name
what each part is, which holds in every mode.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…pages

Base UI is discussing a keyboard section on every component page, so the
Tree page gets one back and the TreeGrid page gets its first, before the
API reference as on the ListBox page. They describe the keys as the tree
handles them now: the shared typeahead, Space and Enter, the selection
modes, checkbox items, disabled rows and trees, the filter input, and the
cell navigation of a tree grid.

The components index picks up the new sections, and the example headings
it was missing.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The Tree and TreeGrid pages now say that every row whose ancestors are
expanded renders, including the ones scrolled out of view, next to the
guidance for large trees. A row a virtualizer leaves out can't take focus
from the keyboard yet.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The options type was `Tree.CreateItemsOptions`, with the flat alias
`TreeCreateItemsOptions`. Combobox and ListBox export only a flat
`Create<Component>ItemsOptions`, so the Tree now exports
`CreateTreeItemsOptions`, and the TreeGrid `CreateTreeGridItemsOptions`,
and neither namespace has a `CreateItemsOptions` member anymore.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Inline the leftover selection pass-through, share the first-selected-row
lookup between the tab stop and the range anchor, memoize the select-all
ids, derive checkbox toggling from the item kind, and run Space and Enter
through one activation path. Tidy the related tests.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Bring select all back to two branches, share one known-item and one
selectability check, check the disabled tree once for the tab stop, pass the
toggled item to propagation directly, and read the row list once per
typeahead scan.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
`actionsRef.setItemSelection(id, false)` with parent propagation
deselected every ancestor of the item, including selected ones that
can't be selected, such as disabled ones. The ancestor walk now skips
them, as the descendant walk does since 2871502.

The walk goes on above a skipped ancestor. The item is a descendant of
every ancestor, so an enabled ancestor above a disabled one no longer
has all of its selectable descendants selected and must be deselected.
Stopping there would leave it selected over an unselected descendant,
which neither propagation nor checkbox state produces elsewhere.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…lection

With `Tree.FilterProvider`, Ctrl+A kept the selected items the filter
hides, while a Shift range, a press with `multiple="opt-in"` and the
selection following the arrow keys dropped them. Every gesture that
replaces the selection now keeps them, as it keeps selected items that
can't be selected: users can't deselect either while it's out of reach.

ListBox has no filter of its own, only filtered `items`, which the Tree
already treats like it (`filter={null}` drops the ids it no longer
knows). So the rule follows the option that loses less user data.

Ctrl+A goes through the same replacement, so while filtering it reports
the shown items in tree order before the hidden ones it keeps.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
With `multiple`, ListBox and Select accept `value={null}`, but the
Tree's types rejected `selectedItems={null}` and
`defaultSelectedItems={null}`, so apps that keep "no selection" as
`null` needed a cast for the Tree only. Both props now accept `null` in
every mode. With multiple selection the root stores it as `[]`, so a
change that leaves the selection empty isn't reported as one.
`onSelectedItemsChange` still receives an array with `multiple`.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The Tree reported highlights as `'item-press' | 'keyboard' |
'imperative-action' | 'none'`, while master's Select, Menu, Combobox and
Autocomplete, and ListBox, report `'keyboard' | 'pointer' | 'none'`, so
an `onItemHighlighted` handler written for one didn't compile for the
other. The tree now records the event that moves focus, as before, and
derives the reason from it with `getHighlightReason`:

- a key press reports `'keyboard'` with its keydown;
- a press on a row, its expansion trigger or `Tree.Label` reports
  `'pointer'` with the press, recorded before focus moves, as ListBox
  records the event behind a highlight;
- anything else reports `'none'` with the real focus event, such as
  tabbing in, `actionsRef.focusItem()` or focus recovery.

The "keyboard can move faster than a group expands" branch reads the
same derived reason, and a new test covers it.

Breaking change: `TreeRootHighlightEventReason` drops `'item-press'` and
`'imperative-action'` and adds `'pointer'`.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Master reports keyboard navigation in lists as `'list-navigation'`:
Select, Combobox, Menu and NavigationMenu, including a submenu opened
with Arrow Right. ListBox reports keyboard selection the same way.
`'keyboard'` is only for highlights and for keyboard value editing,
such as in Slider or NumberField. The Tree reported both as
`'keyboard'`.

Now:
- selection changes made by the keys that move focus (arrows, Home/End,
  Page Up/Page Down and typing, with Shift or with `multiple="opt-in"`)
  and by Ctrl/Cmd+A report `'list-navigation'`, in TreeGrid cells too;
- expansion changes made by Arrow Right, Arrow Left, `*` and TalkBack's
  expand and collapse actions report `'list-navigation'`;
- Space and Enter still go through the row's click and report
  `'item-press'`.

The "keyboard can move faster than a group expands" branch reads the
highlight reason, which stays `'keyboard'`, so it's unaffected.

Breaking change: `TreeRootSelectionChangeEventReason` and
`TreeRootExpansionChangeEventReason` replace `'keyboard'` with
`'list-navigation'`.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Neither part is a form control: the query is UI state, and a row checkbox
only selects its row. Both now render a `form` that names no element, so
Enter in them no longer submits a surrounding form. `Tree.Input` drops
`name` and `form` from its props.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A disabled `Field.Root` disabled `TreeGrid.RowCheckbox` while its row stayed
selectable. The checkbox now shields the Field, Field.Item and CheckboxGroup
contexts, so only the tree decides whether a row can be selected.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Clicking the label did nothing in an empty or fully filtered tree. It now
focuses the tree container, which holds the tab stop then, like
`Listbox.Label` focuses the list. A disabled tree still ignores the click.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ListBox, Select and Combobox lists take optional children, so a list or root
rendered without content needed a type workaround here. Without children,
the roots render nothing and the list renders an empty tree.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The Tree and TreeGrid pages describe `multiple` and `multiple="opt-in"`
without a demo, and recommend a visible label that no demo renders. Each
page gets a demo per mode, and both heroes name the tree with its label
instead of `aria-label`. The TreeGrid page now has its own opt-in section,
like the Tree page.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ches

Also drop the unused proposal settlement callbacks.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Reconcile only the parents an items change touches, deepest first, through
the propagation walk; skip the hierarchy diff when no propagation can apply.
Share one tab-stop focus helper between the label and focus recovery, one
selection-follows-focus method between the Tree and TreeGrid, and one CSS
module between the Tree demos. Drop leftovers from the removed proposal
callbacks.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Let the selection plugin own whether propagation can apply, share one
order-insensitive comparison, return early from the reconcile when nothing
propagates, reuse walked subtrees in the parent check, and keep the TreeGrid
hero's own styles apart from the shared demo module.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Ports the labelsFieldControl option verbatim from mui#5115 (229e63d).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Tree.Label now calls useLabel, so clicks on nested controls no longer
move focus and double clicks don't select its text. It doesn't label an
enclosing Field's control, and it no longer accepts `id`, like the root
labels of Select and Combobox.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… gesture

Ctrl/Cmd+Arrow Up/Down, with or without Shift, moved focus in every
selection mode. Like Listbox, the tree now ignores it unless it's the
focus-only gesture of multiple="opt-in", which Alt no longer joins on
Windows and Linux.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Shared parts named Tree parts in TreeGrid errors, warnings and API
summaries. The filter part error and the unknown filteredItems warning
now name the namespace of the root they render in, and link to its page.
The other shared messages and summaries use neutral wording, and the
missing root and item context errors name the parts of both components.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Tree.List, TreeGrid.Table, TreeGrid.Collection and the FilterProvider
parts took an item type argument. Like Combobox.List and Select.Value,
they now type the item as `any`, and the docs annotate the render
function's parameter instead: `{(node: Node) => …}`. The roots keep
inferring the item type from `items`.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

PR: out-of-date The pull request has merge conflicts and can't be merged. type: new feature Expand the scope of the product to solve a new problem.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant