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

Fix leftElement to work with any element and not just icon names #46

Merged
merged 3 commits into from
Nov 18, 2016

Conversation

pfulop
Copy link
Contributor

@pfulop pfulop commented Nov 17, 2016

Fix for issue #45 .

@@ -296,6 +296,12 @@ class Toolbar extends PureComponent {
return null;
}

if (!this.state.isSearchActive && React.isValidElement(leftElement)) {
return (
React.cloneElement(leftElement, { key: 'customLeftElement' })
Copy link
Owner

Choose a reason for hiding this comment

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

First of all, thank you @pfulop. I think, we should wrap it into the styles.leftElementContainer, since the right element is wrapped in styles.rightElemenentContainer as well. What do you think?

@pfulop
Copy link
Contributor Author

pfulop commented Nov 18, 2016

I agree, check last commit.

Copy link
Owner

@xotahal xotahal left a comment

Choose a reason for hiding this comment

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

Thank you @pfulop ;) 👍

@xotahal xotahal merged commit 6cef3d6 into xotahal:master Nov 18, 2016
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.

2 participants