Giter Club home page Giter Club logo

Comments (5)

justin-schroeder avatar justin-schroeder commented on May 29, 2024

Yep, we need to add that to the docs too. Fields can be given an initial value with :initial=“value” and the entire form can be hydrated the same way :initial=“{email: ‘[email protected]’, name: ‘Justin’}”.

from vue-formulate-legacy.

martinhbramwell avatar martinhbramwell commented on May 29, 2024

... and namespace? :-)

from vue-formulate-legacy.

justin-schroeder avatar justin-schroeder commented on May 29, 2024

What about the namespace? Are you talking about module namespaces?

from vue-formulate-legacy.

martinhbramwell avatar martinhbramwell commented on May 29, 2024

Yep. The docs discuss namespaced modules, but if an external entity writes to the store what is the command?

Maybe your example could include a namespaced module, written to by the first one?

from vue-formulate-legacy.

justin-schroeder avatar justin-schroeder commented on May 29, 2024

Using direct mutations is not fully supported yet. Please see #6. Once support for that has been added we can update the docs to reflect it. However, the namespacing is just standard vuex namespacing. The current mutations are:

setFieldValue()
setFieldErrors()
setFieldValidationErrors()
setFieldMeta()
resetForm()
removeField()

To call them directly you just call store.commit('setFieldValue', {form, field, value}). To call them when using namespaces: store.commit('namespace/setFieldValue', {form, field, value}) – but this is just standard vuex notation, not specific to vue-formulate.

from vue-formulate-legacy.

Related Issues (6)

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.