malte-wessel/react-textfit

Consider height of the container as well

MarcMagnin opened this issue · 2 comments

Again thanks a lot for that library, it works like a charm.
But again I'm coming with more question, is it possible to consider the height of the container as well?

I have a component that is fully resizable and that can end up in such situation:
image

Many thanks!

I’m pretty sure we’re supposed to handle the height of the container as well. It’s either a weird setup you have or a bug in our library. Please try to isolate your behavior and show a demo of the breakage on a website like jsbin.com, then reopen the issue for us to investigate.

Cheers, tricky to setup a jsbin but I'll do later if I find the time.
Definitly it doesn't consider the height even if I set the height as static such as 40px.
I've tried as well to modify the css on the demo page you provide:
image

But maybe that's related to the library resize function not getting called.