Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes #1645: custom connect to be used in plugins definition; propert… #1650

Merged
merged 1 commit into from
Mar 28, 2017

Conversation

mbarto
Copy link
Contributor

@mbarto mbarto commented Mar 28, 2017

…ies in pluginCfg override state connected properties

…nition; properties in pluginCfg override state connected properties
@@ -122,6 +124,11 @@ const getReducers = (plugins) => Object.keys(plugins).map((name) => plugins[name
const getEpics = (plugins) => Object.keys(plugins).map((name) => plugins[name].epics)
.reduce((previous, current) => assign({}, previous, current), {});

const pluginsMergeProps = (stateProps, dispatchProps, ownProps) => {
const {pluginCfg, ...otherProps} = ownProps;
return assign({}, otherProps, stateProps, dispatchProps, pluginCfg || {});
Copy link
Member

@offtherailz offtherailz Mar 28, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Didn't understand how to configure it.
pluginsCfg always wins over stateProps.
Could it be that pluginsCfg can be overridden by stateProps? Or do you mean that all the other Props are overridable while pluginCfg is the way to set fixed config.

can you document it?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pluginCfg is the way to set fixed config, but plugins cfg can be dynamic, using expressions.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.05%) to 76.954% when pulling 1c0b21a on mbarto:plugins_custom_connect into 85a95a5 on geosolutions-it:master.

@mbarto mbarto merged commit 0dd0fe3 into geosolutions-it:master Mar 28, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants