From 0e30af3649ab5c14643f61d60e679138873987b4 Mon Sep 17 00:00:00 2001 From: cbourget Date: Mon, 3 Jun 2019 15:39:52 -0400 Subject: [PATCH] fix(action): fix undefined itemClassFunc --- .../common/src/lib/action/actionbar/actionbar.component.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/common/src/lib/action/actionbar/actionbar.component.ts b/packages/common/src/lib/action/actionbar/actionbar.component.ts index 0f2fc510b3..3e35f3adaf 100644 --- a/packages/common/src/lib/action/actionbar/actionbar.component.ts +++ b/packages/common/src/lib/action/actionbar/actionbar.component.ts @@ -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 @@ -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