Skip to content

Pass namespace as a variable to mapFields #147

@rsf123

Description

@rsf123

I'm trying to pass the namespace to mapFields as a variable rather than a hardcoded element.
So when I define my component, I pass it a property that defines which namespace in the Vuex store to map fields against. However, it keeps giving me a type error on an undefined property.

My code looks similar to this:
props: ['ns'], computed: { ...mapFields(this.ns,['fieldname','fieldname2'] }

If I explicitly provide the namespace, then everything is working.. Is there a way to pass namespace as a variable?

It LOOKS like the component is mapping the fields from the store before it gets the values of the properties.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions