vue-slider-component: Load first component fails
Hi,
I’m trying to use this component but when I first load the slider, the first line doesn’t use the width properly. The slider is only “fixed”, for instance if I resize my window or if open an inspect. This only happens in 1 first slider, as I have a function to add new line, each line contains a slider, besides the first one, the rest is automatically fine.
JS:
components: {
'vueSlider': window['vue-slider-component']
},
HTML:
<td class="text-center">
<vue-slider ref="slider" v-model="rule.value" :options="options"></vue-slider>
</td>
An example of what I’m talking about:

Is this a bug? The HTML/JS framework that I’m using is Foundation 6
Thanks,
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Reactions: 1
- Comments: 16 (8 by maintainers)
@NightCatSama I am calling the vue-slider inside bootstrap collapse where it does not work but it works outside the collapse block. But, calling refresh inside updated() hook solved it. Thanks.
In case it helps others: I had a long-running animated
transitionwith a dynamic list of sliders. I had to wait until the transition was complete (afterEnter) before callingrefresh.Rough example:
@tiagoarasilva Maybe you can try adding this code after loading the data.