Yes, this happens because of how bootstrap-vue manages an array of objects fed into it to create a table.
When you define a b-table component and provide a list of items via the :items property the component takes the array and performs transformations on it, adding functions and properties. This process doesn't seem to trigger the Vuex constraint against mutation outside of mutation functions.
However, when you call one of the added functions, in this case the row.toggleDetails function then the Vuex store becomes aware of the mutations and throws the error.
There are potentially two ways to fix the problem.
First, if you are operating from a simple Vuex store you can add this line of code to the store (as shown in this issue: https://github.com/nuxt/nuxt.js/issues/1917#issuecomment-338471402):
export const strict = false
This will take away the constraint against mutation. This is probably only appropriate for simple applications.
The best option is to use a map function on your computed property.
computed: {
myTableArr() {
this.$store.getters['myTableArr'].map(mta => mta);
}
}
With this safeguard in place, you are returning a new array and not a reference to your Vuex array. The bootstrap-vue b-table component can now modify it and you can make use of those modification in your code without consequence of a Vuex error.
I also typically use a constructor in my map function so it is:
.map(mta => new modelConstructor(mta))