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

chore: improve composition #414

Merged
merged 7 commits into from
May 2, 2017
Merged

Conversation

jmfrancois
Copy link
Collaborator

@jmfrancois jmfrancois commented Apr 27, 2017

Please check if the PR fulfills these requirements

  • The commit(s) message(s) follows our
    guidelines
  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)

What is the current behavior? (You can also link to an open issue here)

If I'm using container ActionsBar it render pure component ActionsBar which render pure Action / Actions or ActionSplitDropdown.
I have no option to use container Action / Actions so I have to re-implement the connection.

What is the new behavior?

The component ActionsBar support for a renderers props which is a mapping of subcomponent used.
The container ActionsBar inject this props with the connected version
screen shot 2017-04-27 at 13 56 53

https://github.com/Talend/ui/wiki/CMF---Container---Components-guidelines

@@ -49,6 +54,9 @@ const actionPropTypes = PropTypes.oneOfType([
}),
]);

Object.keys(Component).forEach((key) => {
ActionBar[key] = Component[key];
});
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This is to keep the attached stuff:
Container's ActionBar.SwitchActions , etc ...

@jmfrancois
Copy link
Collaborator Author

:octocat: Demo is available here

@jmfrancois
Copy link
Collaborator Author

:octocat: Demo is available here

1 similar comment
@jmfrancois
Copy link
Collaborator Author

:octocat: Demo is available here

@jmfrancois
Copy link
Collaborator Author

:octocat: Demo is available here

@jmfrancois
Copy link
Collaborator Author

:octocat: Demo is available here

@jmfrancois jmfrancois merged commit 5e2d7cc into master May 2, 2017
@jmfrancois jmfrancois deleted the jmfrancois/improve-composition-action branch May 2, 2017 14:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants