bsidelinger912 / shiitake

React Line clamp that won't get you fired
MIT License
100 stars 22 forks source link

fall back to 'auto' instead of '0' when fixHeight is undefined #27

Closed BahaaZidan closed 2 years ago

BahaaZidan commented 5 years ago

thanks for the great component.

sometimes the truncated text doesn't even appear because of that line

BahaaZidan commented 5 years ago

@bsidelinger912

bsidelinger912 commented 5 years ago

Hey @bahaa-al-deen, this is intended so that you don't see the long string of untrimmed text before Shiitake is able to trim the text appropriately, it's done intentionally so that the render looks more graceful. Can you explain the issue you're having specifically, are you saying there are times when the text never appears? the same method that truncates the text sets the height as well so by the time the text is trimmed fixedHeight is defined.

BahaaZidan commented 5 years ago

yes. there are times when the text doesn't appear all together. which means sometimes fixedHeight never gets defined

bsidelinger912 commented 5 years ago

Can you give me some steps to reproduce? I've never seen this happen and looking at the code, I don't see how that's possible.