### File

`src/lib/table-row-actions/table-row-action.directive.ts`

### Extends

`AbstractTableRowAction`

### Metadata

Selector | `button[rxapTableRowAction]`
Standalone | `true`

### Index

###### Properties

- Public Readonly isHeader
- Protected options
- Public Abstract type

###### Methods

- Protected getElementList
- Public Async execute
- Public onClick
- Public onConfirmed
- Protected setButtonDisabled
- Protected setButtonEnabled

###### Inputs

- element
- rxapTableRowAction

### Inputs

element
Type : `Data`
Required : true
Defined in src/lib/table-row-actions/table-row-action.directive.ts:23

rxapTableRowAction
Type : `string`
Required : true
Defined in src/lib/table-row-actions/table-row-action.directive.ts:20

### Methods

Protected getElementList
`getElementList()`
Inherited from `AbstractTableRowAction`
Defined in `AbstractTableRowAction:26`
Returns : `Data[]`

Public Async execute
`execute()`
Inherited from `AbstractTableRowAction`
Defined in `AbstractTableRowAction:155`
Returns : `Promise<void>`

Public onClick
`onClick($event: Event)`
Decorators : `@HostListener('click', ['$event'])`
Inherited from `AbstractTableRowAction`
Defined in `AbstractTableRowAction:141`

Parameters :

Name | Type | Optional
$event | `Event` | No

Returns : `any`

Public onConfirmed
`onConfirmed()`
Decorators : `@HostListener('confirmed')`
Inherited from `AbstractTableRowAction`
Defined in `AbstractTableRowAction:136`
Returns : `Promise<void>`

Protected setButtonDisabled
`setButtonDisabled()`
Inherited from `AbstractTableRowAction`
Defined in `AbstractTableRowAction:197`
Disables the action. If the button is pressed the action is NOT executed Hint: the button is set to disabled = true to prevent any conflict with extern button enable features linke : rxapHasEnablePermission Returns : `void`

Protected setButtonEnabled
`setButtonEnabled()`
Inherited from `AbstractTableRowAction`
Defined in `AbstractTableRowAction:209`
Enables the action. If the button is pressed the action is executed TODO : find a way to communicate the disabled state between the features Hint: the button is set to disabled = false to prevent any conflict with extern button enable features linke : rxapHasEnablePermission Returns : `void`

### Properties

Public Readonly isHeader
Type : `boolean`
Default value : `false`
Inherited from `AbstractTableRowAction`
Defined in `AbstractTableRowAction:61`

Protected options
Type : `TableActionMethodOptions | null`
Default value : `null`
Inherited from `AbstractTableRowAction`
Defined in `AbstractTableRowAction:63`

Public Abstract type
Type : `string`
Inherited from `AbstractTableRowAction`
Defined in `AbstractTableRowAction:47`

    import {
      Directive,
      Input,
    } from '@angular/core';
    import { AbstractTableRowAction } from './abstract-table-row-action';

    @Directive({
      selector: 'button[rxapTableRowAction]',
      standalone: true,
      // eslint-disable-next-line @angular-eslint/no-inputs-metadata-property
      inputs: [ 'errorMessage', 'successMessage', 'refresh', 'color' ],
    })
    export class TableRowActionDirective<Data extends Record<string, any>> extends AbstractTableRowAction<Data> {

      @Input({
        required: true,
        alias: 'rxapTableRowAction',
      })
      public type!: string;

      @Input({ required: true })
      public element!: Data;

      protected getElementList(): Data[] {
        return [ this.element ];
      }

    }

# results matching ""

# No results matching ""