Angular material range slider : changing values ​programmatically runs into a consistency check

Discussão em 'Angular' iniciado por Olivier MM, Maio 11, 2025.

  1. Olivier MM

    Olivier MM Guest

    I need to programmatically modify the values of the range material slider. But the slider component seems to check the start-end consistency before the two values are even updated.

    So if the current range is 10-30 on a 0-100 slider and I want to programmatically change it to 80-100, the slider ends up displaying the range 30-100. I think it starts by updating the start value (80), but since the end value is still 30, it limits it to 30.

    https://stackblitz.com/edit/stackblitz-starters-omqswu1n?file=src/main.ts

    I've tried several techniques to overcome this, without success...

    Do you have a solution ?

    Thank you very much!

    Continue reading...

Compartilhe esta Página