Open erickvls opened 5 years ago
How can i filling my select using enum in my component? I can see my enum with the strings but i cant get the value.
This is my select using enum in html link.
This is my enum in my component.ts link
in my component in onInit i have this for fill my select in html `export class MyComponent{
orientacaoSexual: string[]; ngOnInit(): void { var orientacaoSexual = Object.keys(OrientacaoSexual); this.orientacaoSexual = orientacaoSexual.slice(orientacaoSexual.length / 2);`
and in my html page i have
<ngx-select (selectionChanges)="parseValue($event.target.value)" placeholder="Selecione o Estado" [items]="orientacaoSexual" optionValueField="orientacaoSexual"></ngx-select>
and when i click in any select option i get this error. link
How can i filling my select using enum in my component? I can see my enum with the strings but i cant get the value.
This is my select using enum in html link.
This is my enum in my component.ts link
in my component in onInit i have this for fill my select in html `export class MyComponent{
and in my html page i have
<ngx-select (selectionChanges)="parseValue($event.target.value)" placeholder="Selecione o Estado" [items]="orientacaoSexual" optionValueField="orientacaoSexual"></ngx-select>
and when i click in any select option i get this error. link