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

how to get the accurate 'maxHeight'? #6

Open
rainshang opened this issue Sep 6, 2018 · 3 comments
Open

how to get the accurate 'maxHeight'? #6

rainshang opened this issue Sep 6, 2018 · 3 comments

Comments

@rainshang
Copy link

Hi, I imported your work into my project. It is nice. But it needs the 'maxHeight' otherwise it won't expand. The text shown in this component is undecided length, so I cannot set a fixed value here. Do you have any solution for this problem? Thank you~

@cht8687
Copy link
Owner

cht8687 commented Sep 6, 2018

@rainshang
I am glad that you like this module.

Are you trying to build dynamic contents? At the moment, this module doesn't have the ability to detect the children's height.

any ideas how to tackle this issue?
@shineli1984 @stevemao @ddvkid

@rainshang
Copy link
Author

@cht8687
Yes, I'm using this component foe showing the description of a detail page. You know, the content of description varies, depending on the response from the data server. So I cannot get the height for one description text in advance.
I've tried some text measure lib, to calculate the height of a string with a specific font and size. It doesn't work well. Maybe I can go deeper in this way?

@cht8687
Copy link
Owner

cht8687 commented Sep 8, 2018

@rainshang Yes, that sounds a solution. Welcome to raise a PR for this if you found any better solutions. 👍

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

No branches or pull requests

2 participants