fix: re-exposing store in component api, as form depends on it
This commit is contained in:
parent
60d9ae8343
commit
1a012515f9
|
@ -47,6 +47,7 @@ export const bbFactory = ({
|
||||||
setBinding: setBindableComponentProp(treeNode),
|
setBinding: setBindableComponentProp(treeNode),
|
||||||
api,
|
api,
|
||||||
parent,
|
parent,
|
||||||
|
store: store.getStore(treeNode.contextStoreKey),
|
||||||
// these parameters are populated by screenRouter
|
// these parameters are populated by screenRouter
|
||||||
routeParams: () => store.getState()["##routeParams"],
|
routeParams: () => store.getState()["##routeParams"],
|
||||||
}
|
}
|
||||||
|
|
|
@ -94,6 +94,9 @@ const set = (value, dataProviderId, childIndex) =>
|
||||||
const getState = contextStoreKey =>
|
const getState = contextStoreKey =>
|
||||||
contextStoreKey ? contextStores[contextStoreKey].state : rootState
|
contextStoreKey ? contextStores[contextStoreKey].state : rootState
|
||||||
|
|
||||||
|
const getStore = contextStoreKey =>
|
||||||
|
contextStoreKey ? contextStores[contextStoreKey] : rootStore
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
subscribe,
|
subscribe,
|
||||||
update,
|
update,
|
||||||
|
@ -101,4 +104,5 @@ export default {
|
||||||
getState,
|
getState,
|
||||||
create,
|
create,
|
||||||
contextStoreKey,
|
contextStoreKey,
|
||||||
|
getStore,
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue