Ngx-chips: Not able to use ng2-tag-input in Modal Dialog

Created on 18 Jun 2017  路  7Comments  路  Source: Gbuomprisco/ngx-chips

I am trying to use ng2-tag-input in Modal Dialog.
When I click on input field dropdown appears below dropdown.

Issue:-
Dropdown has z-index 100
whereas modal dialog has 1050

refer screenshot attached.

Note: I am using bootstrap 4

screen shot 2017-06-18 at 11 42 37 pm

Most helpful comment

@hiteshgupta9193 Can you try the following in your css:

:host /deep/ ng2-dropdown-menu div { left: inherit !important; top: inherit !important; }

All 7 comments

Try using [appendToBody]="false" (see the doc)

Now it appears like this. Somewhat dislocated from its expected position.

screen shot 2017-06-19 at 9 20 01 pm

Works fine with md-dialog component after adding [appendToBody]="false".

@hiteshgupta9193 Can you try the following in your css:

:host /deep/ ng2-dropdown-menu div { left: inherit !important; top: inherit !important; }

Other workaround that works without use[appendToBody] is decrease the z-index of the modal:
.cdk-overlay-container { z-index: 5 !important; }
But this can broke your template depending on how you use z-index to other components.

I am also having this issues with bootstrap modal. https://github.com/Gbuomprisco/ngx-chips/issues/355#issuecomment-345896432

Check out the option [zIndex] in version 1.7.5

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jfknoepfli picture jfknoepfli  路  3Comments

lukas-bernert picture lukas-bernert  路  4Comments

sivamamidi-REISys picture sivamamidi-REISys  路  3Comments

admix picture admix  路  5Comments

altschuler picture altschuler  路  3Comments