Comments (8)
Hey! So to pass params you'll need to utilize partial application.
v-debounce:1s='test(form.model.name)'
And in your methods
object:
test (name) {
return value => {
// Do some stuff in here
}
}
If your form.model.name
lives inside your vue data you should also be able to access it through this.form.model.name
If you run into more trouble here let me know and maybe we can approach with an alternative solution.
from vue-debounce.
Okay so in your test function try this:
test (val) {
console.log(val)
return cbVal => {
console.log('captured', cbVal)
console.log('param', val)
}
}
I am able to see my original val
and the cbVal
from vue-debounce.
I just tried this
v-debounce:1s='(event) => { test(form.model.name) }'
no error message its been displayed but nothing its getting fired.
from vue-debounce.
Also by default whatever you've attached the directive to input wise the value of that input will be sent to your provided function once the debounce triggers.
from vue-debounce.
I am using vuetify for this. What I have inside my method is
test (val) {
console.log(val)
}
But using your approach stills give me the same error.
from vue-debounce.
Let me run some tests, and see what I can do about that.
from vue-debounce.
@dhershman1 this was working as expected it just google chrome that was hiding me the info on the console cause I clicked on the errors filter and not to show all the console messages. omg. I am sorry for the waste of your time.
from vue-debounce.
Sorry for the super duper late reply to this, but no worries I am just glad we got it working properly! Lol, no time wasted.
from vue-debounce.
Related Issues (20)
- Denounce on textarea updates. HOT 7
- does this fire immediately upon first use? HOT 2
- Failed to resolve directive: debounce #1044 HOT 14
- Calling the debounce funtion unlimited times while page load if the input is not empty in Nuxt.js HOT 6
- vueDebounce doesn't work on safari browsers HOT 2
- How to pass extra parameter to typing function HOT 6
- Method not firing HOT 7
- Put some information for testing inside vue utils HOT 2
- Make getDirective use more clearer in docs HOT 1
- Debounce deep watch handler HOT 1
- When I use debounce directly in the method, I have to add a parenthesis to make it work properly. why? HOT 1
- Does it works with Checkboxes? HOT 1
- CDN (like unpkg.com) HOT 2
- Debounce delays but doesn't debounce HOT 9
- :debounce-events="['blur']" not overriding HOT 14
- Does not work with vue router `navigate` HOT 2
- Doesn't work with SFC syntax HOT 20
- Vue 3 Support Broken HOT 1
- vue3Debounce is not a function HOT 1
- v5.0.0 Migration Warning HOT 8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vue-debounce.