From b6eb239d900ac48547cbd7caed5e78440f139c90 Mon Sep 17 00:00:00 2001 From: Ganesh Kumar Venkata Krishnan Date: Fri, 16 Nov 2018 15:57:37 +0530 Subject: [PATCH] fix(oui-select-picker): default value default value fix when values.length > 1 Close MBP-34 --- packages/oui-select-picker/src/select-picker.controller.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/packages/oui-select-picker/src/select-picker.controller.js b/packages/oui-select-picker/src/select-picker.controller.js index c03ac343..6491536c 100644 --- a/packages/oui-select-picker/src/select-picker.controller.js +++ b/packages/oui-select-picker/src/select-picker.controller.js @@ -31,12 +31,10 @@ export default class SelectPickerController { } if (this.values) { - if (this.values.length === 1) { - this.selectedValue = this.values[0]; - } - if (this.model && find(this.values, this.model)) { this.selectedValue = this.model; + } else { + [this.selectedValue] = this.values; } }