bvaughn / react-virtualized-auto-sizer

Standalone version of the AutoSizer component from react-virtualized
MIT License
603 stars 82 forks source link

Autosizer component does not accept any refs. #84

Closed choierica closed 6 months ago

choierica commented 6 months ago

https://github.com/bvaughn/react-virtualized/blob/master/source/AutoSizer/AutoSizer.js

The AutoSizer component does not accept any refs or spread props.

This is an issue for us as we would like to set the role = "none" or modify any attributes. Would it be possible for the team to take a look at this?

bvaughn commented 6 months ago

The AutoSizer component does not accept any refs or spread props.

Yes it does. You linked to the wrong project above. This is the component for this library: https://github.com/bvaughn/react-virtualized-auto-sizer/blob/master/src/AutoSizer.ts

It spreads ...rest props on whatever tagName you specify: https://github.com/bvaughn/react-virtualized-auto-sizer/blob/e841d37692281677d25d7c57e93764196cdcff5a/src/AutoSizer.ts#L132-L144

Accepted props are generic HTML attributes: https://github.com/bvaughn/react-virtualized-auto-sizer/blob/e841d37692281677d25d7c57e93764196cdcff5a/src/types.ts#L13-L16

I have an e2e test confirming that role can be specified in the way you describe: https://github.com/bvaughn/react-virtualized-auto-sizer/blob/e6760e21538a4feedf91936a58e603f95f8dc33f/src/AutoSizer.test.tsx#L324-L329

My guess is that you're using the wrong library and you filed a bug here accidentally.