1
0
Fork 0
mirror of synced 2024-10-03 19:43:32 +13:00

fix: re-exposing store in component api, as form depends on it

This commit is contained in:
Michael Shanks 2020-09-14 12:32:10 +01:00
parent 2aca93ecf6
commit 7fe7c9b286
2 changed files with 5 additions and 0 deletions

View file

@ -47,6 +47,7 @@ export const bbFactory = ({
setBinding: setBindableComponentProp(treeNode),
api,
parent,
store: store.getStore(treeNode.contextStoreKey),
// these parameters are populated by screenRouter
routeParams: () => store.getState()["##routeParams"],
}

View file

@ -94,6 +94,9 @@ const set = (value, dataProviderId, childIndex) =>
const getState = contextStoreKey =>
contextStoreKey ? contextStores[contextStoreKey].state : rootState
const getStore = contextStoreKey =>
contextStoreKey ? contextStores[contextStoreKey] : rootStore
export default {
subscribe,
update,
@ -101,4 +104,5 @@ export default {
getState,
create,
contextStoreKey,
getStore,
}