[@rxap/material-table-system](../wiki/globals) / TableHeaderButtonDirective

# Class: TableHeaderButtonDirective\<Data\>

Defined in: [packages/angular/material/table-system/src/lib/table-header-button/table-header-button.directive.ts:31](https://gitlab.com/rxap/packages/-/blob/8058138ff98d9e37b711846892c79ebc45ed17d4/packages/angular/material/table-system/src/lib/table-header-button/table-header-button.directive.ts#L31)

## Extends

- `ConfirmDirective`

## Type Parameters

• **Data** *extends* `Record`\<`string`, `any`\>

## Implements

- `OnInit`

## Constructors

### new TableHeaderButtonDirective()

> **new TableHeaderButtonDirective**\<`Data`\>(`overlay`, `elementRef`, `method`, `snackBar`, `matTooltip`, `matButton`, `cdr`): [`TableHeaderButtonDirective`](../wiki/Class.TableHeaderButtonDirective)\<`Data`\>

Defined in: [packages/angular/material/table-system/src/lib/table-header-button/table-header-button.directive.ts:54](https://gitlab.com/rxap/packages/-/blob/8058138ff98d9e37b711846892c79ebc45ed17d4/packages/angular/material/table-system/src/lib/table-header-button/table-header-button.directive.ts#L54)

#### Parameters

##### overlay

`Overlay`

##### elementRef

`ElementRef`

##### method

`Method`

##### snackBar

`MatSnackBar`

##### matTooltip

`null` | `MatTooltip`

##### matButton

`null` | `MatMiniFabButton`

##### cdr

`ChangeDetectorRef`

#### Returns

[`TableHeaderButtonDirective`](../wiki/Class.TableHeaderButtonDirective)\<`Data`\>

#### Overrides

`ConfirmDirective.constructor`

## Properties

### cdr

> `protected` `readonly` **cdr**: `ChangeDetectorRef`

Defined in: [packages/angular/material/table-system/src/lib/table-header-button/table-header-button.directive.ts:70](https://gitlab.com/rxap/packages/-/blob/8058138ff98d9e37b711846892c79ebc45ed17d4/packages/angular/material/table-system/src/lib/table-header-button/table-header-button.directive.ts#L70)

***

### confirmed

> **confirmed**: `EventEmitter`\<`any`\>

Defined in: [packages/angular/components/src/lib/confirm/confirm.directive.ts:39](https://gitlab.com/rxap/packages/-/blob/8058138ff98d9e37b711846892c79ebc45ed17d4/packages/angular/components/src/lib/confirm/confirm.directive.ts#L39)

#### Inherited from

`ConfirmDirective.confirmed`

***

### elementRef

> `protected` `readonly` **elementRef**: `ElementRef`

Defined in: [packages/angular/components/src/lib/confirm/confirm.directive.ts:58](https://gitlab.com/rxap/packages/-/blob/8058138ff98d9e37b711846892c79ebc45ed17d4/packages/angular/components/src/lib/confirm/confirm.directive.ts#L58)

#### Inherited from

`ConfirmDirective.elementRef`

***

### errorMessage?

> `optional` **errorMessage**: `string`

Defined in: [packages/angular/material/table-system/src/lib/table-header-button/table-header-button.directive.ts:41](https://gitlab.com/rxap/packages/-/blob/8058138ff98d9e37b711846892c79ebc45ed17d4/packages/angular/material/table-system/src/lib/table-header-button/table-header-button.directive.ts#L41)

***

### isOverlyOpen

> `protected` **isOverlyOpen**: `boolean` = `false`

Defined in: [packages/angular/components/src/lib/confirm/confirm.directive.ts:52](https://gitlab.com/rxap/packages/-/blob/8058138ff98d9e37b711846892c79ebc45ed17d4/packages/angular/components/src/lib/confirm/confirm.directive.ts#L52)

#### Inherited from

`ConfirmDirective.isOverlyOpen`

***

### options

> `protected` **options**: `null` \| [`TableHeaderButtonMethodOptions`](../wiki/Interface.TableHeaderButtonMethodOptions) = `null`

Defined in: [packages/angular/material/table-system/src/lib/table-header-button/table-header-button.directive.ts:50](https://gitlab.com/rxap/packages/-/blob/8058138ff98d9e37b711846892c79ebc45ed17d4/packages/angular/material/table-system/src/lib/table-header-button/table-header-button.directive.ts#L50)

***

### overlay

> `protected` `readonly` **overlay**: `Overlay`

Defined in: [packages/angular/components/src/lib/confirm/confirm.directive.ts:56](https://gitlab.com/rxap/packages/-/blob/8058138ff98d9e37b711846892c79ebc45ed17d4/packages/angular/components/src/lib/confirm/confirm.directive.ts#L56)

#### Inherited from

`ConfirmDirective.overlay`

***

### positionStrategy?

> `protected` `optional` **positionStrategy**: `PositionStrategy`

Defined in: [packages/angular/components/src/lib/confirm/confirm.directive.ts:50](https://gitlab.com/rxap/packages/-/blob/8058138ff98d9e37b711846892c79ebc45ed17d4/packages/angular/components/src/lib/confirm/confirm.directive.ts#L50)

#### Inherited from

`ConfirmDirective.positionStrategy`

***

### refresh?

> `optional` **refresh**: `boolean`

Defined in: [packages/angular/material/table-system/src/lib/table-header-button/table-header-button.directive.ts:48](https://gitlab.com/rxap/packages/-/blob/8058138ff98d9e37b711846892c79ebc45ed17d4/packages/angular/material/table-system/src/lib/table-header-button/table-header-button.directive.ts#L48)

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

***

### successMessage?

> `optional` **successMessage**: `string`

Defined in: [packages/angular/material/table-system/src/lib/table-header-button/table-header-button.directive.ts:43](https://gitlab.com/rxap/packages/-/blob/8058138ff98d9e37b711846892c79ebc45ed17d4/packages/angular/material/table-system/src/lib/table-header-button/table-header-button.directive.ts#L43)

***

### tableDataSourceDirective

> **tableDataSourceDirective**: [`TableDataSourceDirective`](../wiki/Class.TableDataSourceDirective)\<`Data`\>

Defined in: [packages/angular/material/table-system/src/lib/table-header-button/table-header-button.directive.ts:38](https://gitlab.com/rxap/packages/-/blob/8058138ff98d9e37b711846892c79ebc45ed17d4/packages/angular/material/table-system/src/lib/table-header-button/table-header-button.directive.ts#L38)

***

### unconfirmed

> **unconfirmed**: `EventEmitter`\<`any`\>

Defined in: [packages/angular/components/src/lib/confirm/confirm.directive.ts:42](https://gitlab.com/rxap/packages/-/blob/8058138ff98d9e37b711846892c79ebc45ed17d4/packages/angular/components/src/lib/confirm/confirm.directive.ts#L42)

#### Inherited from

`ConfirmDirective.unconfirmed`

## Accessors

### eventValue

#### Set Signature

> **set** **eventValue**(`value`): `void`

Defined in: [packages/angular/components/src/lib/confirm/confirm.directive.ts:32](https://gitlab.com/rxap/packages/-/blob/8058138ff98d9e37b711846892c79ebc45ed17d4/packages/angular/components/src/lib/confirm/confirm.directive.ts#L32)

##### Parameters

###### value

`""` | `T`

##### Returns

`void`

#### Inherited from

`ConfirmDirective.eventValue`

***

### hasConfirmDirective

#### Set Signature

> **set** **hasConfirmDirective**(`value`): `void`

Defined in: [packages/angular/material/table-system/src/lib/table-header-button/table-header-button.directive.ts:79](https://gitlab.com/rxap/packages/-/blob/8058138ff98d9e37b711846892c79ebc45ed17d4/packages/angular/material/table-system/src/lib/table-header-button/table-header-button.directive.ts#L79)

##### Parameters

###### value

`any`

##### Returns

`void`

## Methods

### execute()

> **execute**(): `Promise`\<`void`\>

Defined in: [packages/angular/material/table-system/src/lib/table-header-button/table-header-button.directive.ts:103](https://gitlab.com/rxap/packages/-/blob/8058138ff98d9e37b711846892c79ebc45ed17d4/packages/angular/material/table-system/src/lib/table-header-button/table-header-button.directive.ts#L103)

#### Returns

`Promise`\<`void`\>

***

### ngOnDestroy()

> **ngOnDestroy**(): `void`

Defined in: [packages/angular/components/src/lib/confirm/confirm.directive.ts:79](https://gitlab.com/rxap/packages/-/blob/8058138ff98d9e37b711846892c79ebc45ed17d4/packages/angular/components/src/lib/confirm/confirm.directive.ts#L79)

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`

***

### ngOnInit()

> **ngOnInit**(): `void`

Defined in: [packages/angular/material/table-system/src/lib/table-header-button/table-header-button.directive.ts:117](https://gitlab.com/rxap/packages/-/blob/8058138ff98d9e37b711846892c79ebc45ed17d4/packages/angular/material/table-system/src/lib/table-header-button/table-header-button.directive.ts#L117)

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`

***

### onClick()

> **onClick**(`$event`): `Promise`\<`void`\>

Defined in: [packages/angular/material/table-system/src/lib/table-header-button/table-header-button.directive.ts:89](https://gitlab.com/rxap/packages/-/blob/8058138ff98d9e37b711846892c79ebc45ed17d4/packages/angular/material/table-system/src/lib/table-header-button/table-header-button.directive.ts#L89)

#### Parameters

##### $event

`Event`

#### Returns

`Promise`\<`void`\>

#### Overrides

`ConfirmDirective.onClick`

***

### onConfirmed()

> **onConfirmed**(): `Promise`\<`void`\>

Defined in: [packages/angular/material/table-system/src/lib/table-header-button/table-header-button.directive.ts:84](https://gitlab.com/rxap/packages/-/blob/8058138ff98d9e37b711846892c79ebc45ed17d4/packages/angular/material/table-system/src/lib/table-header-button/table-header-button.directive.ts#L84)

#### Returns

`Promise`\<`void`\>

#### Overrides

`ConfirmDirective.onConfirmed`

***

### onUnconfirmed()

> `protected` **onUnconfirmed**(`eventValue`?): `void`

Defined in: [packages/angular/components/src/lib/confirm/confirm.directive.ts:142](https://gitlab.com/rxap/packages/-/blob/8058138ff98d9e37b711846892c79ebc45ed17d4/packages/angular/components/src/lib/confirm/confirm.directive.ts#L142)

#### Parameters

##### eventValue?

`any`

#### Returns

`void`

#### Inherited from

`ConfirmDirective.onUnconfirmed`

***

### openConfirmOverly()

> `protected` **openConfirmOverly**(): `void`

Defined in: [packages/angular/components/src/lib/confirm/confirm.directive.ts:84](https://gitlab.com/rxap/packages/-/blob/8058138ff98d9e37b711846892c79ebc45ed17d4/packages/angular/components/src/lib/confirm/confirm.directive.ts#L84)

#### Returns

`void`

#### Inherited from

`ConfirmDirective.openConfirmOverly`

***

### setButtonDisabled()

> `protected` **setButtonDisabled**(): `void`

Defined in: [packages/angular/material/table-system/src/lib/table-header-button/table-header-button.directive.ts:136](https://gitlab.com/rxap/packages/-/blob/8058138ff98d9e37b711846892c79ebc45ed17d4/packages/angular/material/table-system/src/lib/table-header-button/table-header-button.directive.ts#L136)

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`

***

### setButtonEnabled()

> `protected` **setButtonEnabled**(): `void`

Defined in: [packages/angular/material/table-system/src/lib/table-header-button/table-header-button.directive.ts:148](https://gitlab.com/rxap/packages/-/blob/8058138ff98d9e37b711846892c79ebc45ed17d4/packages/angular/material/table-system/src/lib/table-header-button/table-header-button.directive.ts#L148)

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`
