During initialization, the labels are set perfectly. However, if we dynamically change the labels, and they are not the same as before, a new label will be created and added, resulting in, for example, two labels. This happens because you are using the label's value as the key in your loop. This issue could be prevented by using the index instead of the key.
During initialization, the labels are set perfectly. However, if we dynamically change the labels, and they are not the same as before, a new label will be created and added, resulting in, for example, two labels. This happens because you are using the label's value as the key in your loop. This issue could be prevented by using the index instead of the key.
https://github.com/developergovindgupta/multi-range-slider-react-ts/blob/73104e5729ea494c3d5276202f446adbba50b66f/src/components/multirangeslider.tsx#L432C4-L442C6
Solved here: #4