Fix logic error that prevented multi-select dropdowns from closing properly
toggleDropdown was calling closeDropdown, which set active to false, but then toggleDropdown flipped the value of active for both the open and close case, incorretly setting active back to true after closeDropdown was called.
@@ -74,11 +74,10 @@ export class ResourceDropdownComponent implements OnInit, OnChanges {
if (!this.active) { // opening
this.filterValue = '';
this.filteredResources = this.resourcesInOrder;
+ this.active = true;
} else { // closing
this.closeDropdown();
}
-
- this.active = !this.active;
}
resourceChecked(checked: boolean, resource: ResourceChecked): void {
