Giter Club home page Giter Club logo

Comments (7)

fergusmeiklejohn avatar fergusmeiklejohn commented on August 26, 2024 1

For example I'd like to be able to attach an @click event to a built in button in the Template so I can call a method which has access to this eg:

<EasyForm @cancel="myCancelMethod">

and I'd like access to value and context there if I needed them

from quasar-ui-easy-forms.

red-sight avatar red-sight commented on August 26, 2024 1

Hi @fergusmeiklejohn
you can do this:

<EasyForm :key="counter" />

and

return default {
  data () { return { counter: 0 } }
}

Then if you increment the counter, the form is re-loaded and therefore reset. :)
I should add this to the docs!! Thanks for that.

Incrementing the counter doesnt work. The form data remains as it is.

sry

forget to clear the form model. After that the counter incrementing clears the fields.

from quasar-ui-easy-forms.

mesqueeb avatar mesqueeb commented on August 26, 2024

Hi @fergusmeiklejohn
you can do this:

<EasyForm :key="counter" />

and

return default {
  data () { return { counter: 0 } }
}

Then if you increment the counter, the form is re-loaded and therefore reset. :)

I should add this to the docs!! Thanks for that.

from quasar-ui-easy-forms.

fergusmeiklejohn avatar fergusmeiklejohn commented on August 26, 2024

ah that's clever! :-)

I've been trying this out in my app over the last two days and I really like it. Lots of power there. I feel like the API isn't quite perfect yet. I wonder if Vue3 will solve some of this? I really don't know Vue3 yet so can't comment, but I wonder if the composition API will help a common problem I had accessing methods and computed properties as I usually would to handle things in Vue2.
I feel like you need more abstraction for most common tasks, like resetting the form for example, while more flexibility to do what we want to do.. this is so difficult of course.
I also think more functionality around validation would be a selling point and generally delivering more difficult functionality with a simple API would be very useful.

from quasar-ui-easy-forms.

mesqueeb avatar mesqueeb commented on August 26, 2024

You can do already what you want!
Is it possible we chat on discord? It'll be easier to understand each other and I can then add examples to the docs of all the things you try to do.

Sent with GitHawk

from quasar-ui-easy-forms.

red-sight avatar red-sight commented on August 26, 2024

Hi @fergusmeiklejohn
you can do this:

<EasyForm :key="counter" />

and

return default {
  data () { return { counter: 0 } }
}

Then if you increment the counter, the form is re-loaded and therefore reset. :)

I should add this to the docs!! Thanks for that.

Incrementing the counter doesnt work. The form data remains as it is.

from quasar-ui-easy-forms.

mesqueeb avatar mesqueeb commented on August 26, 2024

The new version Blitzar has dedicated documentation on resetting the form data!

See #43

from quasar-ui-easy-forms.

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.