Angular/ng-select: Hide not bind items

106 views Asked by At

how can I hide labels, which are not bind (with no label) in ng-select? There is shown just empty box with "closing cross", but no label.

I would like to hide this box: https://i.stack.imgur.com/4rnMl.png

I created some example here: https://stackblitz.com/edit/stackblitz-starters-3wu26o?file=src%2Ftest%2Ftest.component.html

Maybe I could use some ng-class and display: none, but do not know the proper condition.

Thanks a lot for any advice. Tomas

EDIT: I edited the example, hope it works correctly now ..

1

There are 1 answers

0
kkthlv On

I finally found a solution, which works for me:

div.ng-value.ng-star-inserted:has(span[ng-reflect-ng-item-label='']) {
   display: none;   
}