Topic: Multi-Range-input

carlosalviz free asked 4 years ago


Can you please explain how can I add default values to the new multi-range object?

Documentation shows this as an example: value="{first: 10, second: 15}"

But then both ranges are shown in the middle! (no matter the values in the first or second parameters)

And when you move them, it always shows those default values in the "rangeValueChange" method. (you have to remove the VALUE section in order to get the real values selected)

btw, I'm using 7.5.3 version. (which is not available in the list of this ticket)

tks for ur help.


Arkadiusz Idzikowski staff answered 4 years ago


Hello,

Which browser (and version) and OS do you use? I just double checked that and I couldn't reproduce any of those problems. Can you try this code and let me know if that works for you?

HTML:

<mdb-multi-range-input id="multi-range" min="0" max="100" [value]="{ first: 25, second: 80 }" (rangeValueChange)="onRangeValueChange($event)"></mdb-multi-range-input>

TS:

  onRangeValueChange(event: any) {
    console.log(event);
  }

carlosalviz free commented 4 years ago

Tks!! I was missing the [ ] !!! That-s why I always got the same values.

now it's working!



Please insert min. 20 characters.

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Resolved

Specification of the issue

  • ForumUser: Free
  • Premium support: No
  • Technology: MDB Angular
  • MDB Version: 7.5.1
  • Device: -
  • Browser: Chrome
  • OS: Win10
  • Provided sample code: No
  • Provided link: No