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

Updated styling of the tooltip inner TouchableHighlight to fill the size of the tooltip container #11

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

msftsvachon
Copy link

Otherwise, any content that is wrapped by a tooltip wouldn't flow properly in a flex layout.

@@ -64,7 +70,7 @@ var ViewClass = React.createClass({

render: function() {
return (
<RCTToolTipText ref='toolTipText' onChange={this.handleToolTipTextChange}>
<RCTToolTipText ref='toolTipText' onChange={this.handleToolTipTextChange} style={this.props.style}>>
Copy link
Collaborator

Choose a reason for hiding this comment

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

there is syntax error here

Copy link
Author

Choose a reason for hiding this comment

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

Sorry, copy/paste error. Fixed.

@jrichardlai
Copy link
Collaborator

Hello, thanks for the PR, I'm not sure if that's needed what is the behavior you are seeing right now? Can you make a gif for the 2 differences ? Thanks

@msftsvachon
Copy link
Author

An example of the issue with the current version is this:

Create a list view that grows vertically with the proper flex styling to wrap the content to the next line when the text is longer than the width of the screen. Without the proper flex styling it won't wrap and you'll have text truncation at the end of the first line instead of having it flow to the next line.

I've been using this fixed version locally for a while now and thought I'd contribute it back for others.

@msftsvachon
Copy link
Author

@jrichardlai, @chirag04, are you guys ok with approving the PR?

@jrichardlai
Copy link
Collaborator

It seems that its completely overriding the style so if someone were intending to have some style for the TouchableHighlight it wont be used anymore, was just passing the same style not working?
Also here the style is passed to RCTToolTipText which I don't think is correct. if really needed you can make a separate props for that.
Do you have an example of code that your using for this?

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.

None yet

2 participants