ControlValueAccessor.setDisabledState is not reliably checked for presence before calling #11719

xealot opened this Issue Sep 19, 2016 · 0 comments


None yet
3 participants

xealot commented Sep 19, 2016

I'm submitting a ... (check one with "x")

[x] bug report

Current behavior

The ControlValueAccessor interface recently received a new optional method, setDisabledState. There are places in the form handling code that do not check if the setDisabledState method is present before invoking it.

if (this.control.disabled) this.valueAccessor.setDisabledState(true);

if (this.control.disabled) this.valueAccessor.setDisabledState(true);


Expected behavior

Setting disables state should either always be checked, implemented in some base class or abstract way or have some function that things can call to encapsulate the optional call.

Reproduction of the problem

Set disabled on a form with components that do not implement setDisabledState

  • Angular version: 2.0.0
  • Browser: all
  • Language: all
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment