### File

`src/lib/mat-select-has-enable-permission.directive.ts`

### Extends

`HasEnablePermission`

### Metadata

Selector | `mat-select[rxapHasEnablePermission]:not([formControl]):not([formControlName])`
Standalone | `true`

### Index

###### Properties
Public identifier
###### Methods
Public setDisabled
###### Inputs
rxapHasEnablePermission

### Constructor

`constructor(authorization: AuthorizationService, cdr: ChangeDetectorRef, matSelect: MatSelect, scope: string, valueAccessor: ControlValueAccessor[] | null)`
Defined in src/lib/mat-select-has-enable-permission.directive.ts:23
Parameters :
Name | Type | Optional
authorization | `AuthorizationService` | No
cdr | `ChangeDetectorRef` | No
matSelect | `MatSelect` | No
scope | `string` | No
valueAccessor | `ControlValueAccessor[] | null` | No

### Inputs

rxapHasEnablePermission
Type : `string`
Defined in src/lib/mat-select-has-enable-permission.directive.ts:23

### Methods

Public setDisabled
`setDisabled(disabled: boolean)`
Inherited from `HasEnablePermission`
Defined in `HasEnablePermission:42`
Parameters :
Name | Type | Optional
disabled | `boolean` | No
Returns : `void`

### Properties

Public identifier
Type : `string`
Inherited from `HasEnablePermission`
Defined in `HasEnablePermission:20`

    import {
      ChangeDetectorRef,
      Directive,
      Inject,
      Input,
      Optional,
    } from '@angular/core';
    import {
      ControlValueAccessor,
      NG_VALUE_ACCESSOR,
    } from '@angular/forms';
    import { MatSelect } from '@angular/material/select';
    import { AuthorizationService } from './authorization.service';
    import { HasEnablePermission } from './has-enable-permission';
    import { RXAP_AUTHORIZATION_SCOPE } from './tokens';

    @Directive({
      selector: 'mat-select[rxapHasEnablePermission]:not([formControl]):not([formControlName])',
      standalone: true,
    })
    export class MatSelectHasEnablePermissionDirective extends HasEnablePermission {
      @Input('rxapHasEnablePermission')
      public override identifier!: string;

      constructor(
        @Inject(AuthorizationService)
          authorization: AuthorizationService,
        @Inject(ChangeDetectorRef)
          cdr: ChangeDetectorRef,
        @Inject(MatSelect)
        private readonly matSelect: MatSelect,
        @Optional()
        @Inject(RXAP_AUTHORIZATION_SCOPE)
          scope: string,
        @Optional()
        @Inject(NG_VALUE_ACCESSOR)
          valueAccessor: ControlValueAccessor[] | null = null,
      ) {
        super(authorization, cdr, scope, valueAccessor);
      }

      public setDisabled(disabled: boolean) {
        this.matSelect.disabled = disabled;
      }
    }

# results matching ""

# No results matching ""