File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
projects/coreui-angular/src/lib/tabs-2/tab Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff 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 ( ) } ` ) ;
You can’t perform that action at this time.
0 commit comments