Skip to content

Commit 58aa5da

Browse files
committed
fix(tab.directive): missing disabled attribute
1 parent d0620d1 commit 58aa5da

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

projects/coreui-angular/src/lib/tabs-2/tab/tab.directive.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ import { TabsService } from '../tabs.service';
2828
role: 'tab',
2929
'[attr.aria-selected]': 'isActive()',
3030
'[attr.aria-controls]': 'attrAriaControls()',
31+
'[attr.disabled]': 'attrDisabled() || null',
3132
'[id]': 'propId()',
3233
'[tabindex]': 'isActive() ? 0 : -1'
3334
}
@@ -52,6 +53,7 @@ export class TabDirective implements FocusableOption {
5253
}
5354

5455
readonly #disabled = signal(false);
56+
readonly attrDisabled = computed(() => this.#disabled() || null);
5557

5658
/**
5759
* Item key.
@@ -82,7 +84,8 @@ export class TabDirective implements FocusableOption {
8284

8385
readonly hostClasses = computed(() => ({
8486
'nav-link': true,
85-
active: this.isActive()
87+
active: this.isActive(),
88+
disabled: this.#disabled()
8689
}));
8790

8891
readonly propId = computed(() => this.id() ?? `${this.#tabsService.id()}-tab-${this.itemKey()}`);

0 commit comments

Comments
 (0)