We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0a478e9 commit 96691ebCopy full SHA for 96691eb
src/aria/tree/tree.ts
@@ -205,6 +205,16 @@ export class Tree<V> {
205
scrollActiveItemIntoView(options: ScrollIntoViewOptions = {block: 'nearest'}) {
206
this._pattern.inputs.activeItem()?.element().scrollIntoView(options);
207
}
208
+
209
+ /** Expands all tree items if multi-expandable. */
210
+ expandAll() {
211
+ this._pattern.expansionManager.openAll();
212
+ }
213
214
+ /** Collapses all tree items. */
215
+ collapseAll() {
216
+ this._pattern.expansionManager.closeAll();
217
218
219
220
/**
0 commit comments