ng2-nouislider icon indicating copy to clipboard operation
ng2-nouislider copied to clipboard

config object not updating dynamically

Open ebrister opened this issue 7 years ago • 4 comments

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>

ebrister avatar Nov 30 '17 00:11 ebrister

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

silkyfray avatar Mar 11 '18 11:03 silkyfray

Any updates on this problem yet?

polaris327 avatar May 09 '18 03:05 polaris327

Old issue and still no solution?!

galvakojis avatar May 14 '18 14:05 galvakojis

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?

VictorGerritsen avatar Aug 23 '19 16:08 VictorGerritsen