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 615539c commit 38b0e42Copy full SHA for 38b0e42
src/cdk-experimental/ui-patterns/tree/tree.ts
@@ -33,7 +33,7 @@ export interface TreeItemPattern<V> extends TreeItemInputs<V> {}
33
*/
34
export class TreeItemPattern<V> implements ExpansionItem {
35
/** The position of this item among its siblings. */
36
- readonly index = computed(() => this.parent().children().indexOf(this));
+ readonly index = computed(() => this.tree().visibleItems().indexOf(this));
37
38
/** The unique identifier used by the expansion behavior. */
39
readonly expansionId: SignalLike<string>;
0 commit comments