Seriously stumped here. I have two reactive forms in an Angular project.
Both have a select control with options stored in class variables.
One form uses simple option strings for employee options, as in:
["Dan Smith", "Mark Johnson", etc.]
The other form uses objects, as in:
[
{
value: "Dan Smith",
selected: false,
hidden: false
},
...
]
Stackblitz example: https://stackblitz.com/edit/angular-nks51y
In the example I have buttons for adding new random options, and setting a random selected option.
The buttons work on the form which uses simple strings, but don't work with the form using objects {}.
Additionally, the default value isn't set with the object form.
I know I'm missing something, but can't figure out what.