Skip to content

Infragistics Community Forum / Web / Ignite UI for Angular / How to apply a default value to an IgxSelectComponent

How to apply a default value to an IgxSelectComponent

New Discussion
Frank Neumann
Frank Neumann asked on Nov 30, 2020 3:06 PM
Hi, what is the recommended way to apply a default value to an IgxSelectComponent using a template like this?:
<igx-select type=”string” formControlName=”classification”>
    <label igxLabel>Classification</label>
    <igx-select-item *ngFor=”let classification of classifications$ |async” [value]=”classification”>
        {{classification}}
    </igx-select-item>
</igx-select>
Thanks in advance!
Sign In to post a reply

Replies

  • 0
    Malin Hadzhiev
    Malin Hadzhiev answered on Nov 30, 2020 3:06 PM

    Hello Frank,


    Thank you for contacting Infragistics Support.


    I have been looking into your question and prepared a small sample that you might consider useful. It could be found here. Following the guidelines provided in the Template section of the Select topic, I am using the [(ngModel)] and I defined a global variable where is stored the default value in order to achieve your requirement.


    Please test the sample on your side and let me know how it behaves. If this is not an accurate demonstration of what you are trying to achieve please feel free to modify it and send it back to me along with steps to reproduce. Alternatively, if the behavior cannot be replicated please feel free to provide your own small isolated sample. Remove any external dependencies and code that is not directly related to the issue, zip your application and attach it in this case.


    Having a working sample on my side, which I can debug, is going to be very helpful in finding the root cause of this behavior.


    Thank you for your cooperation.


    Looking forward to hearing from you.


    Regards,
    Malin Hadzhiev
    Entry Level Software Developer
    Infragistics

  • You must be logged in to reply to this topic.
Discussion created by
Favorites
Replies
Created On
Last Post
Discussion created by
Frank Neumann
Favorites
0
Replies
1
Created On
Nov 30, 2020
Last Post
5 years, 9 months ago

Suggested Discussions

Created by

Created on

Nov 30, 2020 3:06 PM

Last activity on

Feb 12, 2026 7:33 PM