I have multiple igx-selects that are used to display a drop-down list.
I want to change the width of this particular igx-select (not for all igx-selects that I have) as well as the font-size of the list. As I tried nothing worked. Is this possible in SCSS?
Here is my igx-select block.
<igx-select #selectCity
placeholder="Select city"
[overlaySettings]="overlaySettings"
[(ngModel)]="city" name="cities">
<igx-select-item style="width: 430px" *ngFor="let item of cities" [value]="item">
{{ item }}
</igx-select-item>
</igx-select>
Thank you very much!
IgxSelect's width depends on the width of its parent container. If you want to change the width of igxSelect you should set the width of its parent like this:
If you need to set the width of the select's dropdown this is a little more tricky. One way to achieve this is to handle
openingevent of the select. In the handler you can set the width of the select toggle element, this is the dropdown, like this:Keep in mind this may brake the positioning of the select dropdown. Setting of the font of the select items could be done via CSS applied to the item itself like this:
Again this may break the positioning of the select items. One way to set the size of the items is via
DisplsyDensity.