Skip to content

Commit 8296b92

Browse files
committed
Removed unused index from tab ui pattern
1 parent 8165c67 commit 8296b92

File tree

1 file changed

+6
-14
lines changed
  • src/cdk-experimental/ui-patterns/tabs

1 file changed

+6
-14
lines changed

Diff for: src/cdk-experimental/ui-patterns/tabs/tab.ts

+6-14
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,6 @@ export class TabPattern {
2424
/** A unique identifier for the tab. */
2525
id: Signal<string>;
2626

27-
/** The position of the tab in the list. */
28-
index = computed(
29-
() =>
30-
this.tablist()
31-
.navigation.inputs.items()
32-
.findIndex(i => i.id() === this.id()) ?? -1,
33-
);
34-
3527
/** Whether the tab is selected. */
3628
selected = computed(() => this.tablist().selection.inputs.selectedIds().includes(this.id()));
3729

@@ -53,11 +45,11 @@ export class TabPattern {
5345
/** The html element that should receive focus. */
5446
element: Signal<HTMLElement>;
5547

56-
constructor(args: TabInputs) {
57-
this.id = args.id;
58-
this.tablist = args.tablist;
59-
this.tabpanel = args.tabpanel;
60-
this.element = args.element;
61-
this.disabled = args.disabled;
48+
constructor(inputs: TabInputs) {
49+
this.id = inputs.id;
50+
this.tablist = inputs.tablist;
51+
this.tabpanel = inputs.tabpanel;
52+
this.element = inputs.element;
53+
this.disabled = inputs.disabled;
6254
}
6355
}

0 commit comments

Comments
 (0)