I want to change the status of Tasks when a particular method is called. But The problem is I cannot get the index of the particular item of the array to change its status. This is my HTML: And this is my Vue: I need make use of markComplete() and markIncomplete() but the problem is I couldn’t find the way
Tag: vue.js
How to scroll to bottom of div when new elements are added
I am trying to make a chat application using Vue and Express. At the moment, I want to make the container with the messages automatically scroll to the bottom when a new message is sent. I tried to do this by using a scrollToEnd function that selects the div container and assigns its scrollHeight to the scrollTop: This gives the
Vue Prop undefined in child component
I am trying to pass an array that inside an object from a parent component to a child component but answers is coming up undefined. When checking the prop in the parent component the data is there, but when it gets past to the child it is undefined. edit: Here is where the parent is declared Parent data: Query: Answer
Render custom template into Vue.js render function
Can Vue render function receive part template from outer? If there is a render function like bellow: the custem_form such as like bellow: or whatever the javascript-type that can explain as a form. I want put it as the custom_form, and then render into the div (you see the custom_form_modal). Is there a way to realize this? EDIT-1 I render
Vue.js – Disable submit button unless original form data has changed
I have a simple form which I have created just for experiment purpose. I am trying to keep the button disable unless original form data is changed but still keep the button disabled if the data changes is reverted back to original data (undo). I found a jQuery solution here but I am looking for vanilla/vue javascript solution. Answer Here’s
Vuejs Es6 class reactivity
i’m trying to have a computed property in vuejs associated to a es6 class. My Vue instance looks like this: My class looks like this If i try to do something like that: but the setter is never called, like the reactivity has been lost and i don’t understand why. I also try: I pass customClass as a prop, but
vue js disable input if value hasn’t changed
I have an input with an initial value: However the disabled binding gives an error: Cannot read property defaultValue of undefined. Best way to do this without spamming vm.data too much? Answer The error: Cannot read property defaultValue of undefined Is because the ref is not available so soon: An important note about the ref registration timing: because the refs
vuex empty state on logout
Quick story of my problem: Absolutely no data is stored in my vuex state when the page loads If the user is logged in(or has info stored in window.localStorage and therefore gets auto logged in) my vuex store retrieves all the info from a socket that requires authentication. Then the user logs out, But my vuex state save still retains
vue js cant understand keep alive
I’m doing tests with this code: https://jsfiddle.net/b2qj69o1/25/ And the js part I did the alert() test to see whether vue will re-render the component. I see that with or without wraping <component> with <keep-alive>, the alert() if called only the first time I enter the Home tab. So I have two questions: 1. What exactly keep-alive does? cause it seems
How can I disable a link in the vue component?
My html like this : My javascript like this : Demo and full code like this : https://jsfiddle.net/q7xcbuxd/221/ I try like that. But if I click button add, it’s not disabled How can I solve this problem? Answer Since you are using boostrap, the proper way to disable a (anchor) button is not to set .disabled = true, but to