bvaughn / react-virtualized-auto-sizer

Standalone version of the AutoSizer component from react-virtualized

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

TypeScript: Incorrect typing of AutoSize height and width

melloware opened this issue · comments

I am upgrading an old library from react-virtualized and it was doing this.

<AutoSizer
          disableHeight={this.props.height !== "auto"}
          disableWidth={this.props.width !== "auto"}
        >
          {({ height, width }) => (

When upgrading to this library its now saying height and width are not valid because my props are defaulted to auto but allow the user to change.

image

The type warnings are intentional (and correct)

Please see the recent discussion on #70

Thank for the great library! I understand your design decision but something to remember.

A common mistake that people make when trying to design something completely foolproof is to underestimate the ingenuity of complete fools. - Douglas Adams