-
-
Notifications
You must be signed in to change notification settings - Fork 37
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
Handle Read More/ Read Less from outside. #61
Comments
@saad9624-tribalScale you can use the |
"optional callback executed when expanded" I didnt find any option to call this function from outside of ReadMore component. It's just executing when expanded. |
@saad9624-tribalScale none of the methods can be called from outside. Can you explain what is the use case that you're trying to achieve ? |
I am trying to expand and collapse from onPress event of custom button. Is it doable? |
@saad9624-tribalScale at the moment its not supported |
I am trying to do this externally because customComponent is not very customizable. |
@saad9624-tribalScale in this file https://github.com/fawaz-ahmed/react-native-read-more/blob/master/example/src/ReadMore.js line 182 Pass a ref to ReadMore and try calling this method. Otherwise you can raise a PR, I can merge it. |
Sure, Thanks. |
@fawaz-ahmed I had difficulties passing a ref, so I created a pr which adds a |
@rawroland would you be able to push the updates anytime soon ? |
@fawaz-ahmed Could you please review and merge above pull request as soon as possible? |
@phuongltd97dn the PR needs some more changes and I'm waiting for it |
Sample code to control expand/collapse via prop:
|
@phuongltd97dn upgrade to version |
Is there any prop available to handle read more / read less from outside. like on button press or something.
The text was updated successfully, but these errors were encountered: