question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

deferredMountedTo is not a function?

See original GitHub issue

I’m trying the following code

<v-map :zoom="zoom" :center="center" id="map" >
    <v-tilelayer :url="url" ></v-tilelayer>
    <marker-popup :position="marker" title="Hey"> </marker-popup> 
</v-map>

where marker-popup’s template is:

<template>
    <v-marker :lat-lng="position" :title="title" :draggable="false">
      <v-popup :content="text"></v-popup>
    </v-marker>
</template>

I get this error: [Vue warn]: Error in mounted hook: "TypeError: this.$children[e].deferredMountedTo is not a function.

Is there something special that I have to do to get this to work?

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:11

github_iconTop GitHub Comments

2reactions
KoRiGaNcommented, Jun 15, 2017

Hi @bencooper222,

Yes, at the moment it was not meant to use custom component inside the map. I think this is the only requirement for a custom component to work properly.

At the moment you have two solutions

  • Use messy code,
  • Use custom component that define an empty deferredMountedTo method

It would be better to make deferredMountedTo optional. I will try to implement that soon.

1reaction
KoRiGaNcommented, Nov 14, 2017

Hi @bencooper222, @nowakjestem, @dithyrambe, @Axel92Dev,

Hi @Fillah,

Having custom content like a button or any Vue component inside the popup should now work with release v0.0.57.

Please let me know if it fixes your problem. Cheers,

Mickaël

Read more comments on GitHub >

github_iconTop Results From Across the Web

deferredMountedTo is not a function? · Issue #52 - GitHub
I'm trying the following code where marker-popup's template is:
Read more >
Getting a TypeError (not a function) Jquery/Javascript
I reckon it's just a stupid syntax error somewhere. $(document).ready(function(){ var seeMore = document.getElementById ...
Read more >
A Pen by Steven J. Selcuk - CodePen
url,this.params),(0,i.default)(this,this.mapObject,s)},methods:{deferredMountedTo:function(t){this.mapObject.addTo(t),this.attributionControl=t.
Read more >
How to solve the "is not a function" error in JavaScript
js we use require() to load external modules and files. This can cause, in some cases, an error like this: TypeError: require(...) is...
Read more >
Uncaught TypeError | Is Not A Function | Solution - YouTube
Have you encountered an error like:- Uncaught TypeError- Some selector is not a function - jQuery is not a function - owlCarousel is...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found