Typings for conditional `disableHeight` and `disableWidth`
DenizUgur opened this issue · comments
Deniz Uğur commented
These props should accept boolean
and children props type can utilize Partial if there is no better option.
Brian Vaughn commented
The types were intentionally chosen as explained in comments like this one #71 (comment). It's okay if you don't agree, but I'm not going to change them based on a subjective assertion.
Deniz Uğur commented
I understand that you may not want to change it. It's just that following use case works without a problem but types indicate there is a problem. I see this as a reasonable use case for responsiveness. If you have any other suggestion, please let me know.
<AutoSizer disableHeight={mobile}>
{({ height, width }) => {
return (
<List
height={height || 500}
itemCount={items.length}
itemData={items}
itemSize={26}
width={width}
>
{Row}
</List>
);
}}
</AutoSizer>