@spartan-ng/brain 0.0.1-alpha.581 → 0.0.1-alpha.582
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -237,7 +237,14 @@ class BrnSelectContent {
|
|
|
237
237
|
event.preventDefault();
|
|
238
238
|
const activeOption = this.keyManager?.activeItem;
|
|
239
239
|
if (activeOption) {
|
|
240
|
-
this._select.
|
|
240
|
+
const currentValue = this._select.value();
|
|
241
|
+
const selectedValue = activeOption.value();
|
|
242
|
+
if (currentValue && currentValue === selectedValue && !this._select.multiple()) {
|
|
243
|
+
this._select.hide();
|
|
244
|
+
}
|
|
245
|
+
else {
|
|
246
|
+
this._select.toggleSelect(activeOption.value());
|
|
247
|
+
}
|
|
241
248
|
}
|
|
242
249
|
}
|
|
243
250
|
/** @nocollapse */ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: BrnSelectContent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|