Skip to content
New issue

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

Duplicate field names #128

Open
danielhughesMSM opened this issue Dec 9, 2020 · 0 comments
Open

Duplicate field names #128

danielhughesMSM opened this issue Dec 9, 2020 · 0 comments

Comments

@danielhughesMSM
Copy link

Hi,

I've been using vuex-map-fields for over a year now and i've never had problems with it before. I've just come across an issue that i'm not sure how to solve.

I'm trying to set up some mappings and i'm running in to an error when i try to map the same name from multiple parts of my module.

For example. If i had:

leftHand: {
indexFinger
},
rightHand: {
indexFinger
}

i would have expected to be able to use v-model="leftHand.indexFinger" and v-model="rightHand.indexFinger" and then this in my computed properties.

...myFieldsMapper([
'rightHand.indexFinger',
'rightHand.indexFinger'
])

unfortunately what i get is:

Error: The key indexFinger is already in use.

Is it actually possible to do what i want or will i have to rename my fields to leftHand.leftHandIndexFinger etc. in order to get it to work?

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant