ng-select
ng-select copied to clipboard
passing custom CSS
Is there any options to pass custom class. like <ng-select [options]="inputTemplates" [multiple]="false" formControlName="userName" [placeholder]="'username.create-user.user-placeHolder' | translate" [allowClear]="canClearSelect", [class]="form-control" >
Yes, I also couldn't find a way to add custom class. I can wrap ng-select with another div and configure css based on class of this parent div, but it will be useful to have possibility to add class straight to ng-select.
Hi @Areiy I need to move the list of options and put them at the right of the input field. This is possible wrapping the ng-select with another div?
Hi @Biptor Try to wrap your ng-select with div:
<div class="ng-select-right">
<ng-select
[options]="myOptions"
[(ngModel)]="mySelect">
</ng-select>
</div>
and add styles:
.ng-select-right select-dropdown{
position: absolute;
top: -100%;
right: 0;
}
I tried that, but still can't style the ng-select like I'd like to (because of shadow dom). Is there anything else to do?
Edit: I was missing ViewEncapsulation.NONE in my parent component