Skip to content

Commit

Permalink
fix(action): fix undefined itemClassFunc
Browse files Browse the repository at this point in the history
  • Loading branch information
cbourget committed Jun 3, 2019
1 parent 86e164b commit 0e30af3
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ import { ActionStore } from '../shared/store';
changeDetection: ChangeDetectionStrategy.OnPush
})
export class ActionbarComponent implements OnDestroy, OnChanges {

static defaultItemClassFunc(action: Action) { return {}; }

/**
* Reference to the ActionbarMode enum for use in the template
* @internal
Expand Down Expand Up @@ -115,7 +118,7 @@ export class ActionbarComponent implements OnDestroy, OnChanges {
/**
* Function to add class to item actionbar
*/
@Input() itemClassFunc: (action: Action) => { [key: string]: boolean };
@Input() itemClassFunc: (action: Action) => { [key: string]: boolean } = ActionbarComponent.defaultItemClassFunc;

/**
* @ignore
Expand Down

0 comments on commit 0e30af3

Please sign in to comment.