Skip to content

Commit d230773

Browse files
IvayloGLipata
authored andcommitted
fix(select): use textContent #6273 (#6312)
1 parent 3c31b31 commit d230773

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

projects/igniteui-angular/src/lib/select/select-item.component.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,8 @@ export class IgxSelectItemComponent extends IgxDropDownItemComponent implements
3737
if (this._text !== undefined) {
3838
return this._text;
3939
}
40-
return this.elementRef.nativeElement.innerText.trim();
40+
// If text @Input is undefined, try extract a meaningful item text out of the item template
41+
return this.elementRef.nativeElement.textContent.trim();
4142
}
4243

4344
/**

0 commit comments

Comments
 (0)