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
0 answers

Dynamic v-model as an array object with keys VueJs

From the title itself I am having problems of creating a v-model with dynamic keys. It always end up with undefined all the bookingRequiredDetails when creating the dynamic v-model. v-model="travellerDetails['traveller_' + traveller][details]" I…
drake24
  • 525
  • 1
  • 11
  • 32
0
votes
1 answer

The second time the JQuery Ajax is fired the data does not bind in vuejs2, although the data update in Vue object

So I`m trying to bind a value to a HTML input type="checkbox" element by using vuejs2 v-model, by calling a JQuery Ajax 'get' function. The value binds correctly the first time, but afterwards it does nothing, It also deselect the input…
JSmi
  • 1
  • 2
0
votes
1 answer

VueJS mutating od duplicate v-model (:value, @input)

I have a problem with using the v-model in my own component. Namely, I dont want to use State or Bus. At present, the component returns the single value correctly in App.js, it duplicates itself. I can not deal with it, please help and explain me…
zielony10
  • 13
  • 6
0
votes
3 answers

Slow v-model for buefy input, v-model.lazy not working either

I have an a couple of input boxes that connect to data via v-model when a GO button is fired in my buefy form that is connected to my buefy data table. the rows in my table can be 2000 to 3000, and my pagination cannot be less than 250 per page. I…
Amir Khadem
  • 681
  • 9
  • 26
0
votes
1 answer

Vue.js / Vuetify / v-data-table: item from v-slot seems to be a copy and not a reference for the attribute

I'm creating a data table with Vuetify to show a list of records, where each record has a list of files to download. Then, I'm creating a button, for each table row, that when it is clicked, it should show a modal with the list of files. The list…
rmmariano
  • 896
  • 1
  • 18
  • 32
0
votes
3 answers

How do I use v-model on none form-related elements?

Before anything else, I'm using Vuetify's VSwitch component inside my-component. I want to return the value of my-component to the parent. something like Then the inside…
Marcus
  • 57
  • 8
0
votes
1 answer

How to let a user modify a computed property in Vue?

I'm collecting some data that I want to allow the user to download, and I'm trying to figure out the best approach for dealing with the filename. The default filename should be dynamic and based on the current date, so I figured that I need to…
Dan Mandel
  • 637
  • 1
  • 8
  • 26
0
votes
2 answers

(Vue.js) V-model array. Having difficulty running function

I'm working with a portfolio project, where users can upload a picture, provide a description below it, and then click the "add" button to add another image and description. I'm trying to add a character counter to the description input, which is a…
asdf123
  • 65
  • 1
  • 6
0
votes
1 answer

Updating the values sent to child component on user click in vuejs

I have two components in mu app.vue and i will send data from app.vue to my first component(filter component) at the time of page load. Now based on the user actions in the displayed data in the second component i need to pass new vales back to the…
SM079
  • 412
  • 2
  • 7
  • 20
0
votes
1 answer

v-model inside a renderless component

CodeSandbox: https://codesandbox.io/s/61my3w7xrw?fontsize=14 I have this renderless component that uses a scoped slot: name: "BlockElement", props: { element: { type: Object, required: true } }, data() { return { …
eozzy
  • 66,048
  • 104
  • 272
  • 428
0
votes
1 answer

Is it bad to use v-model with object especially through several nested components in VueJS?

I have a big problem using v-model with an object passed through 2 layers of nested components. I've described the problem here VueJS v-model for object prop through nested components doesn't make update them as expected . But now I'm wondering,…
shpindler
  • 357
  • 2
  • 12
0
votes
1 answer

Dynamicly bind v-model without extra array

I'm trying to create multiple vuetify-textfields with v-for and a template, so I can easily add and edit textfields while keeping my code clean. Template Tag: