ng-select icon indicating copy to clipboard operation
ng-select copied to clipboard

passing custom CSS

Open santhoshmeti opened this issue 7 years ago • 4 comments

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" >

santhoshmeti avatar Jan 17 '18 19:01 santhoshmeti

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.

sergzven avatar Feb 05 '18 14:02 sergzven

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?

Biptor avatar Mar 12 '18 03:03 Biptor

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;
}

sergzven avatar Mar 12 '18 08:03 sergzven

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

sebastientromp avatar Apr 03 '18 16:04 sebastientromp