We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
i use nuxt js, i want to implementation dynamic form like https://markus.oberlehner.net/blog/how-to-handle-multi-row-forms-with-vue-vuex-and-vuex-map-fields/ how to access mapMultiRowFields on nested state store, bookingData.flight.passengers ? and i got error store.getters[getterType] is not a function
bookingData.flight.passengers
store.getters[getterType] is not a function
store/bookingData.js
import { getField, updateField } from 'vuex-map-fields' export const state = () => ({ flight: { contact: { title: '', fullname: '', email: '', phone: '' }, passengers: [ { title: '', fullname: '', birthday: '' }, ... ] } }) export const getters = { getField } export const mutations = { updateField }
component.vue
<template> .card.shadow.mb-4(v-for="passenger, index in passengers" v-on:key="'passengers'+index") input.form-control( type="text" required v-model="passenger.fullname") ..... <script> ..... computed: { ...mapMultiRowFields({ passengers: 'bookingData.flight.passengers' }) } .....
The text was updated successfully, but these errors were encountered:
Hey @blackinitial!
Am I right that bookingData is a namespaced module? If so, this should help: https://codesandbox.io/s/2v042zjw0r
bookingData
You can read more about dealing with namespaced modules here: https://github.com/maoberlehner/vuex-map-fields#namespaced-vuex-modules
Sorry, something went wrong.
Closing this due to no further feedback from OP.
Hey @blackinitial! Am I right that bookingData is a namespaced module? If so, this should help: https://codesandbox.io/s/2v042zjw0r You can read more about dealing with namespaced modules here: https://github.com/maoberlehner/vuex-map-fields#namespaced-vuex-modules
I'm struggling with this exact issue; the difference is that I'm using Nuxt.js and am having trouble implementing this part:
const store = new Vuex.Store({ // ... modules: { bookingData } });
Any advice? Also get this message in my developer console when I use mapMultiRowFields "(error during evaluation)"
maoberlehner
No branches or pull requests
i use nuxt js, i want to implementation dynamic form like https://markus.oberlehner.net/blog/how-to-handle-multi-row-forms-with-vue-vuex-and-vuex-map-fields/
how to access mapMultiRowFields on nested state store,
bookingData.flight.passengers
?and i got error
store.getters[getterType] is not a function
store/bookingData.js
component.vue
The text was updated successfully, but these errors were encountered: