bvaughn / react-virtualized-auto-sizer

Standalone version of the AutoSizer component from react-virtualized

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

parentNode dimensions defining bug

khris-prog opened this issue · comments

I'm a little confused, but as i see offsetHeight/offsetWidth of parentNode always returns rounded values.In my case i'm getting 233 instead of 232.5 of parent height and as a result grid horizontal scroll is overlapping the parent node.I have tested it with getBoundingClientRect and got correct dimensions of parentNode.Could you fix that?

code example:
const height = this._parentNode.getBoundingClientRect().height || 0;
const width = this._parentNode.getBoundingClientRect().width || 0;