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 2b44107 commit 412cd57Copy full SHA for 412cd57
src/aria/tree/tree.ts
@@ -210,6 +210,16 @@ export class Tree<V> {
210
scrollActiveItemIntoView(options: ScrollIntoViewOptions = {block: 'nearest'}) {
211
this._pattern.inputs.activeItem()?.element()?.scrollIntoView(options);
212
}
213
+
214
+ /** Expands all tree items if multi-expandable. */
215
+ expandAll() {
216
+ this._pattern.expansionManager.openAll();
217
+ }
218
219
+ /** Collapses all tree items. */
220
+ collapseAll() {
221
+ this._pattern.expansionManager.closeAll();
222
223
224
225
/**
0 commit comments