bvaughn / react-window

React components for efficiently rendering large lists and tabular data
https://react-window.now.sh/
MIT License
15.54k stars 779 forks source link

Custom properties and event handlers #693

Open JoshClose opened 1 year ago

JoshClose commented 1 year ago

The documentation shows to set custom properties and event handlers using outerElementType. Is there any reason why it can't/shouldn't be attached to the item?

<VariableSizeGrid {...otherProps}>
    {props => <Cell {...props} onClick={handleClick} />}
</VariableSizeGrid>
jasontlouro commented 1 year ago

Thank you for this, this is a far better approach and should be in the docs.