react-middle-ellipsis
react-middle-ellipsis copied to clipboard
Re-ellipse when size of container is adjusted (for whatever reason)
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
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 ?
I don't, but I am happy to accept PRs :)
ok np, if I find a solution I will make a PR