'noUiSlider - No suffix letters

Good afternoon, I use a translator, so it may not translate everything correctly, but: I had a problem with the display of suffix letters in the slider (more precisely, the slider simply ceases to be displayed when suffixes are connected)

Does anyone know how to fix it, here is the code: HTML:

     <div class="filter-price-slider">
                      <div class="filter-price_inputs">
                        <label class="filter-price_label">
                          <input type="number" min="0" max="500" id="input0" placeholder="0 m. kr."
                            class="filter-price_input">
                        </label>
                        <label class="filter-price_label">
                          <input type="number" min="0" max="500" placeholder="243 m. kr."
                            class="filter-price_input" id="input1">
                        </label>
                      </div>
                      <div class="filter-price_slider" id="range-slider"></div>
                      <div class="filter-price-text-block">
                        <span class="filter-price-text">0 milj. kr.</span>
                        <span class="filter-price-text">500+ milj. kr.</span>
                      </div>
                    </div>

JS:


  const rangeSlider = document.getElementById('range-slider');

if (rangeSlider) {
  noUiSlider.create(rangeSlider, {
   start: [0, 243],
      connect: true,
      step: 1,
  range: {
          'min': [0],
          'max': [500]
  },
  format: wNumb({
      suffix: ' m. kr.'
   })
  });

  const input0 = document.getElementById('input0');
  const input1 = document.getElementById('input1');
  const inputs = [input0, input1];

  rangeSlider.noUiSlider.on('update', function(values, handle){
      inputs[handle].value = Math.round(values[handle]);
  });

  const setRangeSlider = (i, value) => {
      let arr = [null, null];
      arr[i] = value;

      console.log(arr);

      rangeSlider.noUiSlider.set(arr);
  };

  inputs.forEach((el, index) => {
      el.addEventListener('change', (e) => {
          console.log(index);
          setRangeSlider(index, e.currentTarget.value);
      });
  });
}

Problem in this part:

    format: wNumb({
        suffix: ' m. kr.'
     })


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source