vue icon indicating copy to clipboard operation
vue copied to clipboard

Request: add v-model.lazy for components

Open pdanpdan opened this issue 6 years ago • 13 comments

What problem does this feature solve?

v-model for components already supports .trim and .number. Lazy modifier support for components would make it more uniform across the platform.

What does the proposed API look like?

The only change (backwards compatible) would be to add a new property to model definition:

model: {
  prop: 'value',
  event: 'input',
  eventLazy: 'change'
}

pdanpdan avatar Oct 25 '17 17:10 pdanpdan

Is it going to be done?

Mikilll94 avatar Jun 07 '19 09:06 Mikilll94

I think a bunch of us are desperately waiting for this; mid-size forms get very slow as soon as you implement some basic VUE logic around the components, we really need this!

iec989 avatar Jun 18 '19 20:06 iec989

yeah, exactly. I have an app made with Vuetify and on larger forms instead of using v-model I am typing :value="sth" @change="($event) => sth = $event.target.value"

It would be nicer to type just v-model.lazy = "sth"

Mikilll94 avatar Jun 18 '19 20:06 Mikilll94

I would love to have it as well!

wc-matteo avatar Jul 10 '19 07:07 wc-matteo

Also custom rules for Vuelidate need sometimes v-model.lazy, so it'd be useful not to introduce workarounds for it 🙌

mrcnk avatar Jul 11 '19 09:07 mrcnk

Please add this!

Tantawi avatar Nov 13 '19 19:11 Tantawi

Waiting for it! Would be a great enhance on productivity 😄

danielbonifacio avatar Dec 14 '19 16:12 danielbonifacio

This would keep components much cleaner especially when binding to vuex data. Being able to use the .lazy modifier would allow me to keep both get and set functions in the computed properties rather than having to get the data in computed and commit the mutation with a method to be called @change. Please add!!!

sushi2all avatar Jan 30 '20 09:01 sushi2all

Please, add this asap :+1:

pavlovskyarto avatar Mar 06 '20 12:03 pavlovskyarto

Pleeeeeeeeeeease

mes01 avatar Jun 05 '20 10:06 mes01

I have the same need. Workaround: https://stackoverflow.com/questions/56197736/how-to-avoid-v-text-field-to-emit-input-events

Sjoerd82 avatar Oct 08 '20 13:10 Sjoerd82

image

jjsty1e avatar Jun 14 '22 09:06 jjsty1e

I had the same issue. Here's my workaround : `<div class=" el-input el-input--small el-input-group el-input-group--append "

<input size="small" class="el-input__inner" type="text" @blur="checkNameRecord(index)" autocomplete="off" v-model.lazy="record.name" />

{{ "." + soa.name + "." }}
`

Hope this help

SergeBayet avatar Jun 21 '22 07:06 SergeBayet