Answer the question
In order to leave comments, you need to log in
vue js. Initialize component on click?
There is a hidden block with a component that opens at the user's request. And there is one problem, the component contains Google maps, which are not initialized in the hidden block. If the block is initially visible, then everything is OK.
How to initialize or update a component on click?
Answer the question
In order to leave comments, you need to log in
Through $ref
take the component and call $forceUpdate()
?
Type:
<vue-google-map ref="map" :coords=[lat, lng] />
...
methods: {
reinitMap() {
this.$refs.map.$forceUpdate();
}
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question