From e7af9caaebb8a3ce93896e246d6d7656c932193f Mon Sep 17 00:00:00 2001 From: Oleg Pimenov Date: Thu, 7 Mar 2019 10:37:43 +0300 Subject: [PATCH] fix(tree-select): fixed error for test unit (#96) --- commitlint.config.js | 1 + src/lib/tree-select/tree-select.component.ts | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/commitlint.config.js b/commitlint.config.js index 1598e8e3d..ad07f581d 100644 --- a/commitlint.config.js +++ b/commitlint.config.js @@ -38,6 +38,7 @@ module.exports = { 'toggle', 'tooltip', 'tree', + 'tree-select', 'typography', 'visual' ] diff --git a/src/lib/tree-select/tree-select.component.ts b/src/lib/tree-select/tree-select.component.ts index f48b7bf53..42c770b9c 100644 --- a/src/lib/tree-select/tree-select.component.ts +++ b/src/lib/tree-select/tree-select.component.ts @@ -837,7 +837,7 @@ export class McTreeSelect extends McTreeSelectMixinBase implements event.preventDefault(); this.open(); - } else if (!this.multiple) { + } else if (!this.multiple && this.tree.keyManager && this.tree.keyManager.onKeydown) { this.tree.keyManager.onKeydown(event); } }