Vue-slider-component: Slider Issue in Modal

Created on 10 Oct 2017  路  9Comments  路  Source: NightCatSama/vue-slider-component

It's not sliding inside modal,
But when height chage of browser it's slide to max value automatically.

Most helpful comment

I had this issue too (using a collapse with bootstrap-vue).
Here is how I did for the record:

<b-btn v-b-toggle.filters>Filters</b-btn>
<b-collapse id="filters" @shown="showFilters">
    <!-- ... -->
    <vue-slider ref="amountSlider" v-model="amount"></vue-slider>
</b-collapse>

<script>
export default {
// ...
    methods: showFilters() {
        this.$refs.amountSlider.refresh();
    }
// ...
}
</script>

Fixed typo.

All 9 comments

:real-time="true"
Sorry for raising issue it's solved

:real-time="true" is not the best solution.

More solutions can refer to here https://github.com/NightCatSama/vue-slider-component#exceptions

I had the same problem , could not move the slider but after I added :real-time="true" , I was capable of moving it. The only problem is : the maximum value when the slider first shows is always set at position" 0 " (the two values max and min were both on same position = 0 no matter what the values were. Any idea on how to solve this please?

@chaymag Refer to the solution link above.

I already did but I still haven't found the solution.

You have to make sure to call refresh after the component is visible.

Thank you it worked.

I had this issue too (using a collapse with bootstrap-vue).
Here is how I did for the record:

<b-btn v-b-toggle.filters>Filters</b-btn>
<b-collapse id="filters" @shown="showFilters">
    <!-- ... -->
    <vue-slider ref="amountSlider" v-model="amount"></vue-slider>
</b-collapse>

<script>
export default {
// ...
    methods: showFilters() {
        this.$refs.amountSlider.refhresh();
    }
// ...
}
</script>

I had this issue too (using a collapse with bootstrap-vue).
Here is how I did for the record:

<b-btn v-b-toggle.filters>Filters</b-btn>
<b-collapse id="filters" @shown="showFilters">
    <!-- ... -->
    <vue-slider ref="amountSlider" v-model="amount"></vue-slider>
</b-collapse>

<script>
export default {
// ...
    methods: showFilters() {
        this.$refs.amountSlider.refresh();
    }
// ...
}
</script>

Fixed typo.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

michaelpelletier picture michaelpelletier  路  8Comments

joshua-larks picture joshua-larks  路  5Comments

callumacrae picture callumacrae  路  3Comments

bogdan1190 picture bogdan1190  路  5Comments

adrianolobo picture adrianolobo  路  4Comments