Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
155
how to style both igx-simple-combo, autocomplete to basic look-and-feel of html select
posted

Dear Sir/Mdm/Ms:

  If i want to use both html select and igx-simple-combo (which behaves like auto-complete) and autocomplete (https://ko.infragistics.com/products/ignite-ui-angular/angular/components/autocomplete) side-by-side, how to style both igx-simple-combo, autocomplete to basic look-and-feel of html select from previous example here:

https://stackblitz.com/edit/xusebhfz-n7f4xj4n?file=src%2Fapp%2Fgrid%2Fgrid-sample-right-pinning%2Fgrid-right-pinning.component.html

was resorted to do something like this to make it works:

<igx-simple-combo 
                [id]="getXXXId(cell)" 
                [data]="XXXlist"
                [class]="'my-simple-combo2'"
                (selectionChanging)="XXXChanging($event, cell)" 
                placeholder="Select XXX"
                [ngModel]="getXXXFromCell(cell).XXXName_YYY_ZZZ" 
                [valueKey]="'XXXName_YYY_ZZZ'" 
                [displayKey]="'XXXName'">
                <ng-template igxComboClearIcon></ng-template>
              </igx-simple-combo>

:host ::ng-deep .igx-input-group--box .igx-input-group__bundle{
  height: 25px !important;
}

:host ::ng-deep igx-input-group > div.igx-input-group__wrapper > div{
  background-color: white;
}

:host ::ng-deep igx-input-group > div.igx-input-group__wrapper > div > div.igx-input-group__bundle-end > igx-suffix.igx-combo__toggle-button{
  background-color: white;
}

:host ::ng-deep .igx-input-group__notch:empty+.igx-input-group__bundle-main .igx-input-group__input {
  height: 25px !important;
}

Any better way?

Thanks in advance.