Closed theromie closed 7 years ago
this.$ref.slider1.refresh()
can refresh the component.
Error in mounted hook: "TypeError: Cannot read property 'slider1' of undefined"
oops, my apologies, it should be this.$refs.slider.refresh()
.
https://vuejs.org/v2/guide/components.html#Child-Component-Refs
This should be inside mounted()? because i am facing same issue
After the component is rendered, then call this method.
No man not working
You can see here can give you inspiration: https://jsfiddle.net/9pp3dqkq/54/
Dude onclick of refresh is not going to 100
I am using getuikit and showing slider inside dropdown but dropdown failed to refresh vue slider
Maybe you can try to listen for the shown
event and call refresh later to refresh the component.
UIkit.dropdown(element).shown({ this.$refs.daysSlider.refresh(); });
Syntax Error: this is a reserved word
I also have updated your jsfiddle to work with dropdown of uikit Snippets
thanks its working
what if i want to do it like UIkit.dropdown(element).shown({ this.$refs.daysSlider.refresh(); });
That's not the UIkit binding of events.
look it: https://getuikit.com/docs/javascript#programmatic-use
$('#offcanvas').on('show', function () {
// do something
});
I am loading component dynamically like
<component :is="currentView"></component>
but slider range left and right stuck to 0. I also use :real-time property but doesn't worked. How can i reinitialize vueslider?<vue-slider ref="slider1" v-bind="price" v-model="price.value" :real-time="true"></vue-slider>