tb / ng2-nouislider

Angular2 noUiSlider directive
http://tb.github.io/ng2-nouislider/
MIT License
184 stars 114 forks source link

config object not updating dynamically #133

Open ebrister opened 6 years ago

ebrister commented 6 years ago

Changes to config attribute are not reflected. It appears to be not implemented in ngOnChanges.

<nouislider [config]="configObject|async" ngModel="{{Value|async}}" (change)="changeValue($event)"></nouislider>

silkyfray commented 6 years ago

I am experiencing the same issue. config doesn't change after the initial assignment.

polaris327 commented 6 years ago

Any updates on this problem yet?

galvakojis commented 6 years ago

Old issue and still no solution?!

VictorGerritsen commented 5 years ago

bump any way to workaround this?

Edit: According to the source, changes to the config are updated, but only a select few:

    if (this.slider && (changes.min || changes.max || changes.step || changes.range)) {
      setTimeout(() => {
        this.slider.updateOptions({
          range: Object.assign({}, {
            min: this.min,
            max: this.max
          }, this.range || {}),
          step: this.step
        });
      });
    }
  }

I need to change the pips at runtime, any reason why this change is not part of this method?