VueJs | Laravel | Vuejs Function not working inside a loop












0















i have an Error :



You may have an infinite update loop in a component render function.


This function :



         getID: function(invoicesnvs) {
this.idd=invoicesnvs.id;
},


Is not working inside this loop function:



        getRinvoicesnv: function () {
axios.get('/getrinvoicesnv')
.then(response => {
console.log(response.data);
this.invoicesnvs = response.data;
})
.catch(error => {
console.log('errors: ', error);
})
},
created: function () {
this.getRinvoicesnv()
this.getTemplate()
}


In blade :



<tr v-for="invoicesnv in invoicesnvs">   
<a type="button" @click="getID(invoicesnv)" ></a>
</tr>


Any help ? Thank you !
Note please that the function works only after executing another function existing in blade.










share|improve this question

























  • Where is getRinvoicesnv() called? This doesn't seem to be your full code.

    – Namoshek
    Nov 25 '18 at 17:45











  • Thank you for ur interest, i eddited post for you

    – yassine j
    Nov 25 '18 at 17:48











  • This code still doesn't seem to be the problematic part. Do you have a calculated property somewhere? Or can you show us the full code of the component?

    – Namoshek
    Nov 25 '18 at 17:50











  • I have a computed to calcule total yes and other get /post functions

    – yassine j
    Nov 25 '18 at 17:53
















0















i have an Error :



You may have an infinite update loop in a component render function.


This function :



         getID: function(invoicesnvs) {
this.idd=invoicesnvs.id;
},


Is not working inside this loop function:



        getRinvoicesnv: function () {
axios.get('/getrinvoicesnv')
.then(response => {
console.log(response.data);
this.invoicesnvs = response.data;
})
.catch(error => {
console.log('errors: ', error);
})
},
created: function () {
this.getRinvoicesnv()
this.getTemplate()
}


In blade :



<tr v-for="invoicesnv in invoicesnvs">   
<a type="button" @click="getID(invoicesnv)" ></a>
</tr>


Any help ? Thank you !
Note please that the function works only after executing another function existing in blade.










share|improve this question

























  • Where is getRinvoicesnv() called? This doesn't seem to be your full code.

    – Namoshek
    Nov 25 '18 at 17:45











  • Thank you for ur interest, i eddited post for you

    – yassine j
    Nov 25 '18 at 17:48











  • This code still doesn't seem to be the problematic part. Do you have a calculated property somewhere? Or can you show us the full code of the component?

    – Namoshek
    Nov 25 '18 at 17:50











  • I have a computed to calcule total yes and other get /post functions

    – yassine j
    Nov 25 '18 at 17:53














0












0








0








i have an Error :



You may have an infinite update loop in a component render function.


This function :



         getID: function(invoicesnvs) {
this.idd=invoicesnvs.id;
},


Is not working inside this loop function:



        getRinvoicesnv: function () {
axios.get('/getrinvoicesnv')
.then(response => {
console.log(response.data);
this.invoicesnvs = response.data;
})
.catch(error => {
console.log('errors: ', error);
})
},
created: function () {
this.getRinvoicesnv()
this.getTemplate()
}


In blade :



<tr v-for="invoicesnv in invoicesnvs">   
<a type="button" @click="getID(invoicesnv)" ></a>
</tr>


Any help ? Thank you !
Note please that the function works only after executing another function existing in blade.










share|improve this question
















i have an Error :



You may have an infinite update loop in a component render function.


This function :



         getID: function(invoicesnvs) {
this.idd=invoicesnvs.id;
},


Is not working inside this loop function:



        getRinvoicesnv: function () {
axios.get('/getrinvoicesnv')
.then(response => {
console.log(response.data);
this.invoicesnvs = response.data;
})
.catch(error => {
console.log('errors: ', error);
})
},
created: function () {
this.getRinvoicesnv()
this.getTemplate()
}


In blade :



<tr v-for="invoicesnv in invoicesnvs">   
<a type="button" @click="getID(invoicesnv)" ></a>
</tr>


Any help ? Thank you !
Note please that the function works only after executing another function existing in blade.







laravel






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 25 '18 at 17:48







yassine j

















asked Nov 25 '18 at 17:37









yassine jyassine j

848




848













  • Where is getRinvoicesnv() called? This doesn't seem to be your full code.

    – Namoshek
    Nov 25 '18 at 17:45











  • Thank you for ur interest, i eddited post for you

    – yassine j
    Nov 25 '18 at 17:48











  • This code still doesn't seem to be the problematic part. Do you have a calculated property somewhere? Or can you show us the full code of the component?

    – Namoshek
    Nov 25 '18 at 17:50











  • I have a computed to calcule total yes and other get /post functions

    – yassine j
    Nov 25 '18 at 17:53



















  • Where is getRinvoicesnv() called? This doesn't seem to be your full code.

    – Namoshek
    Nov 25 '18 at 17:45











  • Thank you for ur interest, i eddited post for you

    – yassine j
    Nov 25 '18 at 17:48











  • This code still doesn't seem to be the problematic part. Do you have a calculated property somewhere? Or can you show us the full code of the component?

    – Namoshek
    Nov 25 '18 at 17:50











  • I have a computed to calcule total yes and other get /post functions

    – yassine j
    Nov 25 '18 at 17:53

















Where is getRinvoicesnv() called? This doesn't seem to be your full code.

– Namoshek
Nov 25 '18 at 17:45





Where is getRinvoicesnv() called? This doesn't seem to be your full code.

– Namoshek
Nov 25 '18 at 17:45













Thank you for ur interest, i eddited post for you

– yassine j
Nov 25 '18 at 17:48





Thank you for ur interest, i eddited post for you

– yassine j
Nov 25 '18 at 17:48













This code still doesn't seem to be the problematic part. Do you have a calculated property somewhere? Or can you show us the full code of the component?

– Namoshek
Nov 25 '18 at 17:50





This code still doesn't seem to be the problematic part. Do you have a calculated property somewhere? Or can you show us the full code of the component?

– Namoshek
Nov 25 '18 at 17:50













I have a computed to calcule total yes and other get /post functions

– yassine j
Nov 25 '18 at 17:53





I have a computed to calcule total yes and other get /post functions

– yassine j
Nov 25 '18 at 17:53












0






active

oldest

votes











Your Answer






StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53470128%2fvuejs-laravel-vuejs-function-not-working-inside-a-loop%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes
















draft saved

draft discarded




















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53470128%2fvuejs-laravel-vuejs-function-not-working-inside-a-loop%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Lallio

Unable to find Lightning Node

Futebolista