sliderOptions: SliderOptions = {
floor: 0,
ceil: 100,
showSelectionBar: true,
hidePointerLabels: true,
hideLimitLabels: true,
disabled: false
};
disableEnableFields(disabled: boolean) {
this.sliderOptions = Object.assign({}, this.sliderOptions, {disabled: disabled});
disabled ? this.form.disable() : this.form.enable();
}
This works if I don't have the formControlName on the directive. With the formControlName, it adds the [disabled]='disabled' to the DOM, and the classes show up, but I can still move the slider. The same goes in reverse. If I start with the slider options set to disabled: true. it IS disabled and I cannot move the slider, and dynamically setting disabled to false does not allow me to move the slider. Again, this only seems to be the case when I'm using formControlName. If I don't, it disables/enables the slider dynamically without issue.
Edit: This also seems to be affected because of enabling, disabling the form dynamically. When this line
disabled ? this.form.disable() : this.form.enable();
is removed, the slider enables/disables as it should.