react-middle-ellipsis icon indicating copy to clipboard operation
react-middle-ellipsis copied to clipboard

Re-ellipse when size of container is adjusted (for whatever reason)

Open bluepeter opened this issue 4 years ago • 3 comments

Right now, this component correctly re-ellipses when the browser is resized, using window.addEventListener("resize", () => { under the hood. However, when the surrounding table/etc is resized for some other reason, then the re-ellipse does not occur. For example, the surrounding container may resize due to XHR or other dynamic content.

We need to account for these sorts of resizes and re-compute widths and re-ellipse.

Possibly use https://github.com/ctrlplusb/react-sizeme or https://github.com/metalabdesign/react-resize-observer

bluepeter avatar Oct 06 '19 20:10 bluepeter

Hello, bluepeter and thanks for this component! I know its a bit late, but I have this bug because I use AutoSize of react-virtualized...

Do you know how to workaround this problem ?

theocerutti avatar Jun 01 '21 16:06 theocerutti

I don't, but I am happy to accept PRs :)

bluepeter avatar Jun 01 '21 16:06 bluepeter

ok np, if I find a solution I will make a PR

theocerutti avatar Jun 02 '21 10:06 theocerutti