-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bug(demo): Dropdown "Toggle button dropdown" doesn't close in demo #478
Comments
Hi @iuristona , Did you try adding Thanks |
Any update on this issue? |
The problem is, as soon as the opened dropdown looses it's focus, |
I have come up with an almost complete solution to the problem: I defined a second status variable in dropdown-demo.ts, wich only gets toggled you click the "Toggle button dropdown" - button: export class DropdownDemoComponent {
public disabled:boolean = false;
public status:{isopen:boolean, isOpenedByButton:boolean} = {isopen: false, isOpenedByButton: false};
public items:Array<string> = ['The first choice!',
'And another choice for you.', 'but wait! A third!'];
public toggled(open:boolean):void {
console.log('Dropdown is now: ', open);
}
public toggleDropdown($event:MouseEvent):void {
$event.preventDefault();
$event.stopPropagation();
this.status.isOpenedByButton = !this.status.isOpenedByButton;
this.status.isopen = this.status.isOpenedByButton;
}
} The only problem is, that when you close the dropdown by clicking anywhere else in the window, you need to press the button twice to reopen the dropdown, because it first attempts to close it. |
The "Toggle button dropdown" doesn't close once it is opened.
Another similiar bug occurs when the dropdownToggle contains childrens.
<a dropdownToggle> <i class="icon-bell"></i> <span class="badge badge-default">7</span> </a>
The text was updated successfully, but these errors were encountered: