davestewart / vuex-pathify

Vue / Vuex plugin providing a unified path syntax to Vuex stores
https://davestewart.github.io/vuex-pathify
MIT License
1.37k stars 57 forks source link

Edit nested object value #82

Closed WhiteBookmark closed 5 years ago

WhiteBookmark commented 5 years ago

Does Pathify only support editing of 1 level deep object editing only ? I am trying to modify using store.set for the following object:

Styling: {
        JobTitle: {
            animated: false,
            infinite: true,
            shake: true,
        },
    },

I am using store.set('Styling@JobTitle@animated', true) Instead of modifying the animated value, it replaces the whole JobTitle object with true Am I missing something or this is normal ?

WhiteBookmark commented 5 years ago

Oh nevermind, I was using the syntax wrong, to access a property of an object we need to use a dot instead of @