Ngx-bootstrap: Dropdown miss isOpen output, onShown / onHidden outputs emits only on body container

Created on 19 Apr 2017  路  2Comments  路  Source: valor-software/ngx-bootstrap

isOpen has no public output
onHidden / onShown emits only when ComponentLoader used ( container are set )

comp(dropdown)

Most helpful comment

known issue: https://github.com/valor-software/ngx-bootstrap/issues/1886
fix will be published later today

All 2 comments

Same problem here. onShown event is not fired!

<div *ngIf="isEnabled"
     bsDropdown
     [container]="(type === 'son') ? 'body' : null"
     [(isOpen)]="isOpen"
     (onShown)="onShown()"
     autoClose="outsideClick"
     class="dropdown">
    <button (click)="$event.stopPropagation()"
            [disabled]="isDisabled"
            [style.border]="getButtonBorderStyle()"
            bsDropdownToggle
            type="button"
            class="clickable btn dropdown-toggle">
        <span class="dropdown-text">
            test
        </span>
        <span class="dropdown-caret"></span>
    </button>
    <div *bsDropdownMenu class="dropdown-menu-right">
        test
    </div>
</div>

known issue: https://github.com/valor-software/ngx-bootstrap/issues/1886
fix will be published later today

Was this page helpful?
0 / 5 - 0 ratings