0👍
Update: Accidentally registered the mapGetters in methods instead of computed, that’s why it did not work.
- [Vuejs]-Vue.js 2.0 data binding issue – one data field's change will trigger the other data fields' filter
- [Vuejs]-Passing dynamic data to Vue params/routes
-1👍
Your function parameters seem to be the wrong way around. In your first snippet you are returning a function that takes a parameter state
and returns a function that takes a parameter title
, when you want to return a state selector (that is, a function that takes state
as a parameter).
Try this, just switching the names of the parameters:
[GETTERS.GET_ERROR_BY_MB_ID]: title => state => {
return state.submitErrors.find(e => e.meta.name === title)?.content
.titleOfError;
}
Source:stackexchange.com