-
Notifications
You must be signed in to change notification settings - Fork 144
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 manually trigger resize #38
Comments
You could If that doesn't do the trick we could try something else. Granted it might be useful to add this to the API and I will perhaps create a PR for this, if anyone has any ideas on how best to implement it please let me know. |
A potentially better solution to manually triggering a resize may be to watch the parent element for resize and then trigger a resize/ @denis-sokolov Would this be of interest? Instead of watching window resizing watch for parent element resizing (which should capture both window resizing and other resizing events). If so, would be happy to take a look into implementing/opening a PR. |
Slight update on this. I made a rough pass implementation on my forked project. Can also be used via |
Use patched fit text package, see issue #38: malte-wessel/react-textfit#38
I also seem to have this issue with text dynamically retrieved by a database and rendered in React JS. If I use it place the text manually in my code it works, but when retrieved dynamically it does not. I am looking for a way to trigger resize as well or something similar. |
In my case my div is resizable, so I would like to have a method that I could call on div resize stop that would trigger a resize on the Textfit element
The text was updated successfully, but these errors were encountered: