Questions tagged [v-model]

Use this tag for questions related to the v-model directive of Vue.js.

The v-model directive is used to create two-way data bindings on form input, textarea, and select elements. It automatically picks the correct way to update the element based on the input type. Although a bit magical, v-model is essentially syntax sugar for updating data on user input events. For more information: https://vuejs.org/v2/guide/forms.html#Modifiers

420 questions
0
votes
1 answer

Vuejs : using the same array of data for two different lists of inputs

I have created a fiddle to explain what I want : https://jsfiddle.net/silentway/aro5kq7u/3/ The standalone code is as follows :

This is…

GuitarExtended
  • 787
  • 2
  • 11
  • 32
0
votes
0 answers

vue checkbox doesn't bind data correctly by v-model

I have a todolist that you can add new todo, and mark each todo as completed by click checkbox, and select the item visibility of the list by all or active or completed on the footer. When I select Completed on the footer, it only shows item that is…
Yu-Lin Wang
  • 131
  • 2
  • 5
0
votes
2 answers

Vue.js global data access with v-model

I am working on a web app where users can work on a project. The structure of the app is as follows: Component A (app) Component B1-Bn (header, footer, main window etc., children of A) Component C1 (Input area; with inputs for the user to work on…
Nathan
  • 3
  • 1
  • 2
0
votes
1 answer

How to bind to unknown property name at development time

The following correctly binds to a property on my model as does this …
0
votes
0 answers

v-pagination v-model sets to 0 instead of the default value I've set

I'm pretty new to VueJS but everything was fine and made sense but suddenly, I'm having an issue using vue-plain-pagination. In the data() of my Vue component, I set a currentPage prop default to 1 like so: ... data() { return { info:…
0
votes
1 answer

index of v-for as value for v-model

I need to set the index of a v-for to a dynamic v-model, but I don't know how to do that without trigger an error, I have tried this that works but is not elegant and gave me errors in the console: In my template section:
0
votes
1 answer

Vue - How To Access the Calling Control of the Computed Property

Take the following example code: new Vue({ el: '#app', data: { name: 'Test' }, computed: { hover: function () { //I'd like to use the "data-prefix" here instead of "XXX" return this.name + "XXX"; } …
David Rogers
  • 2,601
  • 4
  • 39
  • 84
0
votes
1 answer

vue.js dynamically added input v-model does not work

I googled all day and did not find solution to this problem yet. I try to build app, where I can insert input with v-model which should be reactive and value of this input must be shown in other div element. What I really need is to have a code…
Lauris Macke
  • 77
  • 1
  • 9
0
votes
1 answer

Pass value of input to v-model

how to pass automatticly the value of the input into the v-model ? Thank you :) Code : i tried to do in my script : upload: { bank:'', id:{{$in->id}}, cash:'' …
yassine j
  • 495
  • 1
  • 11
  • 27
0
votes
1 answer

Multiple select tags (v-for) with the same v-model

I am having multiple selects with the same v-model and would like to display value of each select separately. Do I need to bind :key? Example: jsfiddle
kabugh
  • 305
  • 1
  • 9
  • 30
0
votes
1 answer

Vue.js How to target object with unknown name in an array on v-model input

I am generating an object onclick with an automatically-generated name. The name will be different each time. I then want to change the object's values with an input using v-model. How can I target the object if the name is unknown? Here's what I…
0
votes
1 answer

How can I give specific parameter to a v-model call

How can I give the index of my array days, in the v-model ? And: dayList(index) { console.log(index) //…
GuillaumeRZ
  • 2,656
  • 4
  • 19
  • 35
0
votes
0 answers

Trouble with Vue.js v-model within Quasar q-select tag dynamically rendering computed properties

I am working with Vue.js within the Quasar framework to develop a hybrid app. At one point, I have a somewhat large form that I have split into subcomponents to deal with sections of input, and I’m using two-way binding via the .sync modifier…
naomi13
  • 1
  • 2
0
votes
1 answer

V-Model won't update

I have made a simple Datatable with search input, Student.js Vue.component('student-list',{ props: ['students'], template:`
CodingCode
  • 123
  • 2
  • 12
0
votes
1 answer

Vue: v-model in nested v-for-loop

I am stuck with a nested for loop and a v-model inside it. I have no problems updating the data inside the first for-loop (row.amount), but when I change the input member.share for John in one row, all of John's shares are updated? my…
Jannes
  • 11
  • 2
1 2 3
27
28