This is my first VUE project and i’m having difficulties figuring out how and where to store my data on a “list users” page with a user details drawer.
The user table is paginated from the server and data is stored in the root of the page. When a row is clicked I copy the row data to a VUEX store and opens a user details drawer which takes its data from the store. Clicking on details in the drawer opens forms from where it is possible to change the data. When data change it’s committed back to the server and updated in the store. However my table does not change as there is no binding between the data in the table and in the drawer / store.
I’m afraid that I did it all wrong, but I can’t figure out what a better way would be.
Can someone give me a better approach to manage the data so that I have binding all the way from table to drawer. Just to add to the complexity… I don’t wan’t the drawer to disappear when I switch pages on the table. Meaning that the drawer can’t just show the data from the same place where the table gets it because that data will chance when changing page. That is why I make a copy of the row data before showing the drawer.