Skip to content

Commit d8780a7

Browse files
committed
fix(grid-toolbar): adding fix for toolbar button type #5232
1 parent ed28c5e commit d8780a7

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

projects/igniteui-angular/src/lib/grids/grid-toolbar.component.ts

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ import {
2121
AbsoluteScrollStrategy
2222
} from '../services/index';
2323
import { GridBaseAPIService } from './api.service';
24+
import { IgxButtonDirective } from '../directives/button/button.directive';
2425
import { IgxGridBaseComponent, IGridDataBindable } from './grid-base.component';
2526
import { IgxDropDownComponent } from '../drop-down/drop-down.component';
2627
import { IgxColumnHidingComponent } from './column-hiding.component';
@@ -104,8 +105,8 @@ export class IgxGridToolbarComponent extends DisplayDensityBase {
104105
* const hidingButton = this.grid.toolbar.columnHidingButton;
105106
* ```
106107
*/
107-
@ViewChild('columnHidingButton', { static: false })
108-
public columnHidingButton;
108+
@ViewChild('columnHidingButton', { read: IgxButtonDirective, static: false })
109+
public columnHidingButton: IgxButtonDirective;
109110

110111
/**
111112
* Provides a reference to the `IgxDropDownComponent` of the Export button.
@@ -122,8 +123,8 @@ export class IgxGridToolbarComponent extends DisplayDensityBase {
122123
* const exportBtn = this.grid.toolbar.exportButton;
123124
* ```
124125
*/
125-
@ViewChild('btnExport', { static: false })
126-
public exportButton;
126+
@ViewChild('btnExport', { read: IgxButtonDirective, static: false })
127+
public exportButton: IgxButtonDirective;
127128

128129
/**
129130
* Provides a reference to the `IgxDropDownComponent` of the Column Pinning UI.
@@ -149,8 +150,8 @@ export class IgxGridToolbarComponent extends DisplayDensityBase {
149150
* const pinningButton = this.grid.toolbar.columnPinningButton;
150151
* ```
151152
*/
152-
@ViewChild('columnPinningButton', { static: false })
153-
public columnPinningButton;
153+
@ViewChild('columnPinningButton', { read: IgxButtonDirective, static: false })
154+
public columnPinningButton: IgxButtonDirective;
154155

155156
/**
156157
* Returns a reference to the `IgxGridComponent` component, hosting the `IgxGridToolbarComponent`.

0 commit comments

Comments
 (0)