goetzrobin / spartan

Cutting-edge tools powering Angular full-stack development.
https://spartan.ng
MIT License
1.09k stars 120 forks source link

fix(select): initialvalue is recognized when provided with formcontrol #283

Closed elite-benni closed 1 month ago

elite-benni commented 2 months ago

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

Which package are you modifying?

What is the current behavior?

When options are provided via an array in a @for loop. The initial value is not set when provided with an formcontrol.

Closes #282

What is the new behavior?

The initial value is displayed correctly.

Does this PR introduce a breaking change?

Other information

The value was set via writevalue before the options were registered, therefore the value was ignored.

goetzrobin commented 1 month ago

@thatsamsonkid do you think this might resolve the issue you wrote tests for, too?

thatsamsonkid commented 1 month ago

@thatsamsonkid do you think this might resolve the issue you wrote tests for, too?

Maybe I'll check it out