# Class TableHeaderButtonDirective<Data>

#### Type Parameters

- Data extends Record<string, any>

#### Hierarchy

- ConfirmDirective
  - TableHeaderButtonDirective

#### Implements

- OnInit

- Defined in packages/angular/material/table-system/src/lib/table-header-button/table-header-button.directive.ts:31

#####
Index

### Constructors

constructor

### Properties

cdr
confirmed
elementRef
errorMessage?
isOverlyOpen
options
overlay
positionStrategy?
refresh?
successMessage?
tableDataSourceDirective
unconfirmed

### Accessors

eventValue
hasConfirmDirective

### Methods

execute
ngOnDestroy
ngOnInit
onClick
onConfirmed
onUnconfirmed
openConfirmOverly
setButtonDisabled
setButtonEnabled

##
Constructors

### constructor

- new TableHeaderButtonDirective<Data extends Record<string, any>>(
  overlay: Overlay,
  elementRef: ElementRef,
  method: Method,
  snackBar: MatSnackBar,
  matTooltip: null | MatTooltip,
  matButton: null | MatMiniFabButton,
  cdr: ChangeDetectorRef,
  ): TableHeaderButtonDirective<Data>

  #### Type Parameters

  - Data extends Record<string, any>

  #### Parameters

  - overlay: Overlay
  - elementRef: ElementRef
  - method: Method
  - snackBar: MatSnackBar
  - matTooltip: null | MatTooltip
  - matButton: null | MatMiniFabButton
  - cdr: ChangeDetectorRef

  #### Returns TableHeaderButtonDirective<Data>

  Overrides ConfirmDirective.constructor

  - Defined in packages/angular/material/table-system/src/lib/table-header-button/table-header-button.directive.ts:54

##
Properties

### `Protected` `Readonly` cdr

cdr: ChangeDetectorRef

- Defined in packages/angular/material/table-system/src/lib/table-header-button/table-header-button.directive.ts:70

### confirmed

confirmed: EventEmitter<any> = ...

Inherited from ConfirmDirective.confirmed

- Defined in packages/angular/components/src/lib/confirm/confirm.directive.ts:39

### `Protected` `Readonly` elementRef

elementRef: ElementRef

Inherited from ConfirmDirective.elementRef

- Defined in packages/angular/components/src/lib/confirm/confirm.directive.ts:58

### `Optional` errorMessage

errorMessage?: string

- Defined in packages/angular/material/table-system/src/lib/table-header-button/table-header-button.directive.ts:41

### `Protected` isOverlyOpen

isOverlyOpen: boolean = false

Inherited from ConfirmDirective.isOverlyOpen

- Defined in packages/angular/components/src/lib/confirm/confirm.directive.ts:52

### `Protected` options

options: null | TableHeaderButtonMethodOptions = null

- Defined in packages/angular/material/table-system/src/lib/table-header-button/table-header-button.directive.ts:50

### `Protected` `Readonly` overlay

overlay: Overlay

Inherited from ConfirmDirective.overlay

- Defined in packages/angular/components/src/lib/confirm/confirm.directive.ts:56

### `Protected` `Optional` positionStrategy

positionStrategy?: PositionStrategy

Inherited from ConfirmDirective.positionStrategy

- Defined in packages/angular/components/src/lib/confirm/confirm.directive.ts:50

### `Optional` refresh

refresh?: boolean

true - after the action is executed the table datasource is refreshed

- Defined in packages/angular/material/table-system/src/lib/table-header-button/table-header-button.directive.ts:48

### `Optional` successMessage

successMessage?: string

- Defined in packages/angular/material/table-system/src/lib/table-header-button/table-header-button.directive.ts:43

### tableDataSourceDirective

tableDataSourceDirective: TableDataSourceDirective<Data>

- Defined in packages/angular/material/table-system/src/lib/table-header-button/table-header-button.directive.ts:38

### unconfirmed

unconfirmed: EventEmitter<any> = ...

Inherited from ConfirmDirective.unconfirmed

- Defined in packages/angular/components/src/lib/confirm/confirm.directive.ts:42

##
Accessors

### eventValue

- set eventValue(value: "" | T): void

  #### Parameters

  - value: "" | T

  #### Returns void

  Inherited from ConfirmDirective.eventValue

  - Defined in packages/angular/components/src/lib/confirm/confirm.directive.ts:32

### hasConfirmDirective

- set hasConfirmDirective(value: any): void

  #### Parameters

  - value: any

  #### Returns void

  - Defined in packages/angular/material/table-system/src/lib/table-header-button/table-header-button.directive.ts:79

##
Methods

### execute

- execute(): Promise<void>

  #### Returns Promise<void>

  - Defined in packages/angular/material/table-system/src/lib/table-header-button/table-header-button.directive.ts:103

### ngOnDestroy

- ngOnDestroy(): void

  A callback method that performs custom clean-up, invoked immediately before a directive, pipe, or service instance is destroyed.

  #### Returns void

  Inherited from ConfirmDirective.ngOnDestroy

  - Defined in packages/angular/components/src/lib/confirm/confirm.directive.ts:79

### ngOnInit

- ngOnInit(): void

  A callback method that is invoked immediately after the default change detector has checked the directive's data-bound properties for the first time, and before any of the view or content children have been checked. It is invoked only once when the directive is instantiated.

  #### Returns void

  Implementation of OnInit.ngOnInit

  - Defined in packages/angular/material/table-system/src/lib/table-header-button/table-header-button.directive.ts:117

### onClick

- onClick($event: Event): Promise<void>

  #### Parameters

  - $event: Event

  #### Returns Promise<void>

  Overrides ConfirmDirective.onClick

  - Defined in packages/angular/material/table-system/src/lib/table-header-button/table-header-button.directive.ts:89

### onConfirmed

- onConfirmed(): Promise<void>

  #### Returns Promise<void>

  Overrides ConfirmDirective.onConfirmed

  - Defined in packages/angular/material/table-system/src/lib/table-header-button/table-header-button.directive.ts:84

### `Protected` onUnconfirmed

- onUnconfirmed(eventValue?: any): void

  #### Parameters

  - `Optional` eventValue: any

  #### Returns void

  Inherited from ConfirmDirective.onUnconfirmed

  - Defined in packages/angular/components/src/lib/confirm/confirm.directive.ts:142

### `Protected` openConfirmOverly

- openConfirmOverly(): void

  #### Returns void

  Inherited from ConfirmDirective.openConfirmOverly

  - Defined in packages/angular/components/src/lib/confirm/confirm.directive.ts:84

### `Protected` setButtonDisabled

- setButtonDisabled(): void
  `Protected`

  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

  - Defined in packages/angular/material/table-system/src/lib/table-header-button/table-header-button.directive.ts:136

### `Protected` setButtonEnabled

- setButtonEnabled(): void
  `Protected`

  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

  - Defined in packages/angular/material/table-system/src/lib/table-header-button/table-header-button.directive.ts:148