Git Product home page Git Product logo

Comments (8)

dhershman1 avatar dhershman1 commented on July 23, 2024 1

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.

dhershman1 avatar dhershman1 commented on July 23, 2024 1

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.

arivera12 avatar arivera12 commented on July 23, 2024

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.

dhershman1 avatar dhershman1 commented on July 23, 2024

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.

arivera12 avatar arivera12 commented on July 23, 2024

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.

dhershman1 avatar dhershman1 commented on July 23, 2024

Let me run some tests, and see what I can do about that.

from vue-debounce.

arivera12 avatar arivera12 commented on July 23, 2024

@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.

dhershman1 avatar dhershman1 commented on July 23, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.