We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
get<Item>FromStore
1 parent fb46f35 commit 1411681Copy full SHA for 1411681
src/make-get-mixin.ts
@@ -53,6 +53,7 @@ export default function makeFindMixin(options) {
53
const WATCH = `${prefix}Watch`
54
const QUERY_WHEN = `${prefix}QueryWhen`
55
const GET_ACTION = `get${capitalized}`
56
+ const GET_GETTER = `get${capitalized}FromStore`
57
const LOCAL = `${prefix}Local`
58
const QID = `${prefix}Qid`
59
const ID = `${prefix}Id`
@@ -74,6 +75,13 @@ export default function makeFindMixin(options) {
74
75
},
76
[QUERY_WHEN]() {
77
return true
78
+ },
79
+ // Exposes `get<Item>FromStore`
80
+ [GET_GETTER]() {
81
+ return id => {
82
+ const serviceName = this[SERVICE_NAME]
83
+ return this.$store.getters[`${serviceName}/get`](id)
84
+ }
85
}
86
87
methods: {
0 commit comments