trimox / angular-mdc-web

Angular wrapper for Material Design (Web) Components
https://trimox.github.io/angular-mdc-web
MIT License
518 stars 87 forks source link

compareWith in select not working when using form.patchValue #2190

Open NestorPerez13 opened 4 years ago

NestorPerez13 commented 4 years ago

Describe the bug When passing a function using compareWith in select the function is never called, and the value of the select never changes, unless you click manually on a value.

To Reproduce Steps to reproduce the behavior:

  1. Try to replicate the behavior described on https://trimox.github.io/angular-mdc-web/#/angular-mdc-web/select-demo/examples (compareWith example).
  2. Update the form value with patchValue({})

Stackblitz: https://stackblitz.com/edit/angular-mdc-xsf5dm?file=src%2Fapp%2Fapp.component.ts (example seems to be broken, but anywhere you can see that the value of the select never gets modified)

Expected behavior Value on the template should change when using form.patchValue function

What Angular MDC version are you using? 5.1.1

What OS are you using?: OSX Mojave 10.14.6

What browser(s) is this bug affecting?: Google Chrome (others not tested).