File

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

Extends

AbstractTableRowAction

Metadata

Index

Properties
Methods
Inputs

Inputs

element
Type : Data
Required :  true
rxapTableRowAction
Type : string
Required :  true

Methods

Protected getElementList
getElementList()
Inherited from AbstractTableRowAction
Returns : Data[]
Public Async execute
execute()
Inherited from AbstractTableRowAction
Returns : Promise<void>
Public onClick
onClick($event: Event)
Decorators :
@HostListener('click', ['$event'])
Inherited from AbstractTableRowAction
Parameters :
Name Type Optional
$event Event No
Returns : any
Public onConfirmed
onConfirmed()
Decorators :
@HostListener('confirmed')
Inherited from AbstractTableRowAction
Returns : Promise<void>
Protected setButtonDisabled
setButtonDisabled()
Inherited from AbstractTableRowAction

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

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
Protected options
Type : TableActionMethodOptions | null
Default value : null
Inherited from AbstractTableRowAction
Public Abstract type
Type : string
Inherited from AbstractTableRowAction
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 ""