Closed dl7 closed 5 years ago
@dl7 You can set [autoClose]="false" to the dropdown, like in this example: https://valor-software.com/ngx-bootstrap/#/dropdowns#autoclose
@ludmilanesvitiy However, as I mentioned, I would like to keep the auto close behavior after outside click. If I set [autoClose]="false", it won't work.
I have the same problem. Any solution ?
Same problem. Any solution ?
Same here
Actually I found the solution that worked for me: bs-datepicker-inline and implement custom dropdown element on ng-select
i was facing the same issue, i fixed through adding class to my ngbDropdown and the button which click i reopen the dropdown.
@HostListener('document:click', ['$event']) onClick(event: MouseEvent) { if (this.dateFilterButton.nativeElement.contains(event.target) || this.dateFilterSpan.nativeElement.contains(event.target)) { this.dropDown.open(); } else if (this.dropDown && !this.ddEl.nativeElement.contains(event.target) && this.dropDown.isOpen() && !document.querySelector(".cdk-overlay-backdrop")) { this.close(); } }
also need to find the appended call while you open the datepicker. Ex : !document.querySelector(".cdk-overlay-backdrop")
Bug description or feature request:
I'm creating a component to filter data in a table. The component is using dropdown. In
dropdownMenu
I can put various types of input e.g. checkboxes, text, datepicker. Checkboxes and text work very well, but I've problem with datepicker. When I select a date, both datepicker and dropdown close, but I want to dropdown stay open.It is possible to add
[autoClose]="false"
property, however I would like to keep the auto close behavior after outside click.There is any solution to prevent dropdown close after date select?
Plunker/StackBlitz that reproduces the issue:
StackBlitz: https://stackblitz.com/edit/angular-nusk6m
Versions of ngx-bootstrap, Angular, and Bootstrap:
ngx-bootstrap: 5.1.2
Angular: 8.2.0
Bootstrap: 4.3.1