From 36a81435cf5f64dfc34d3a435b295ddd6472b1cc Mon Sep 17 00:00:00 2001 From: Joffrey JAFFEUX Date: Fri, 3 Sep 2021 16:40:20 +0200 Subject: [PATCH] DEV: simplify logic when selecting an undefined value (#14225) --- .../select-kit/addon/components/select-kit.js | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/app/assets/javascripts/select-kit/addon/components/select-kit.js b/app/assets/javascripts/select-kit/addon/components/select-kit.js index a0f547c2ab4..35c75af79a7 100644 --- a/app/assets/javascripts/select-kit/addon/components/select-kit.js +++ b/app/assets/javascripts/select-kit/addon/components/select-kit.js @@ -783,14 +783,7 @@ export default Component.extend( select(value, item) { if (!isPresent(value)) { - if (!this.validateSelect(this.selectKit.highlighted)) { - return; - } - - this.selectKit.change( - this.getValue(this.selectKit.highlighted), - this.selectKit.highlighted - ); + this._onClearSelection(); } else { const existingItem = this.findValue(this.mainCollection, item); if (existingItem) {