We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Would be great to provide the same API than https://github.com/bvaughn/react-virtualized/blob/master/docs/AutoSizer.md#prop-types (Same implementation / different interface)
One of my use cases is doing the size measurement on a single direction.
The text was updated successfully, but these errors were encountered:
FWIW, here is how I have reimplemented the same interface:
import React from 'react' import recompose from 'recompose' import AutoSize from 'react-virtualized/dist/commonjs/AutoSizer' export default recompose.createHelper((options = {}) => (Component) => { const Dimensions = props => ( <AutoSize {...options}> {(newProps) => { if (newProps.width === 0 && newProps.height === 0) { return null } const componentProps = { ...props } if (!options.disableHeight) { componentProps.containerHeight = newProps.height } if (!options.disableWidth) { componentProps.containerWidth = newProps.width } return <Component {...componentProps} /> }} </AutoSize> ) return Dimensions }, 'dimensions')
Sorry, something went wrong.
@digidem Happy to see we go in the same direction:
No branches or pull requests
Would be great to provide the same API than https://github.com/bvaughn/react-virtualized/blob/master/docs/AutoSizer.md#prop-types (Same implementation / different interface)
One of my use cases is doing the size measurement on a single direction.
The text was updated successfully, but these errors were encountered: