Skip to content

Commit

Permalink
fix(tab.directive): missing disabled attribute
Browse files Browse the repository at this point in the history
  • Loading branch information
xidedix committed Jun 21, 2024
1 parent d0620d1 commit 58aa5da
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion projects/coreui-angular/src/lib/tabs-2/tab/tab.directive.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ import { TabsService } from '../tabs.service';
role: 'tab',
'[attr.aria-selected]': 'isActive()',
'[attr.aria-controls]': 'attrAriaControls()',
'[attr.disabled]': 'attrDisabled() || null',
'[id]': 'propId()',
'[tabindex]': 'isActive() ? 0 : -1'
}
Expand All @@ -52,6 +53,7 @@ export class TabDirective implements FocusableOption {
}

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

/**
* Item key.
Expand Down Expand Up @@ -82,7 +84,8 @@ export class TabDirective implements FocusableOption {

readonly hostClasses = computed(() => ({
'nav-link': true,
active: this.isActive()
active: this.isActive(),
disabled: this.#disabled()
}));

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

0 comments on commit 58aa5da

Please sign in to comment.