Description
When putting <igx-select-item> inside an @if / @else condition they don't render.
- igniteui-angular version: 21.1
- browser: any
Steps to reproduce
- Use a condition like this one:
<igx-select #select>
<label igxLabel>Even/Odd Select</label>
@for (item of items; track item; let e = $even) {
@if ($even) {
<igx-select-item [value]="item"> even: {{ item }} </igx-select-item>
} @else {
<igx-select-item [value]="item"> odd: {{ item }} </igx-select-item>
}
}
</igx-select>
Result
The select dropdown renders empty
Expected result
Items are still rendered.
I'm not sure if this is a limitation of the component or of Angular.
The limitation could be avoided by moving the conditions inside the element.
Attachments
Stackblitz: https://stackblitz.com/edit/qgbuhzqd?file=src%2Fapp%2Fselect-sample-1%2Fselect-sample-1.component.html
Description
When putting
<igx-select-item>inside an @if / @else condition they don't render.Steps to reproduce
Result
The select dropdown renders empty
Expected result
Items are still rendered.
I'm not sure if this is a limitation of the component or of Angular.
The limitation could be avoided by moving the conditions inside the element.
Attachments
Stackblitz: https://stackblitz.com/edit/qgbuhzqd?file=src%2Fapp%2Fselect-sample-1%2Fselect-sample-1.component.html