You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Current API asks the user to measure and track the size of the target container, i.e. it will only invoke a callback on "resize". This is fine if you only want to re-render on change (relatively rare in my opinion), but harder if you also need to obtain exact width/height of an element.
There are many other helpers providing this feature including dimensions in pixels out there, e.g. react-virtualized-auto-size
The main use case I see this component used in our apps is: render a vertical virtualized list inside of a flex-growing View somewhere in a page. For this specific use case, react-virtualized-auto-size (and I guess similarly the other available solutions) don't work 100% fine out of the box i.e.: you'll still have to provide a growing box (<FlexView grow width="100%" />) for it as a parent. For this reason, it might make sense to include such an helper in BRC?
Before making any decisions here, we should analyze slightly better all the ResizeSensor usages in our projects.
Sketched proposal:
if ResizeSensor is used somewhere for the first simple use case, keep it as is. Otherwise remove the component
add FlexAutoSizer or similar component, providing dimensions out of the box. Implement it either based on an external dependency (if ResizeSensor is removed) or on top of ResizeSensor itself.
Opinions?
The text was updated successfully, but these errors were encountered:
Current API asks the user to measure and track the size of the target container, i.e. it will only invoke a callback on "resize". This is fine if you only want to re-render on change (relatively rare in my opinion), but harder if you also need to obtain exact width/height of an element.
There are many other helpers providing this feature including dimensions in pixels out there, e.g.
react-virtualized-auto-size
The main use case I see this component used in our apps is: render a vertical virtualized list inside of a flex-growing View somewhere in a page. For this specific use case,
react-virtualized-auto-size
(and I guess similarly the other available solutions) don't work 100% fine out of the box i.e.: you'll still have to provide a growing box (<FlexView grow width="100%" />
) for it as a parent. For this reason, it might make sense to include such an helper in BRC?Before making any decisions here, we should analyze slightly better all the
ResizeSensor
usages in our projects.Sketched proposal:
ResizeSensor
is used somewhere for the first simple use case, keep it as is. Otherwise remove the componentFlexAutoSizer
or similar component, providing dimensions out of the box. Implement it either based on an external dependency (if ResizeSensor is removed) or on top of ResizeSensor itself.Opinions?
The text was updated successfully, but these errors were encountered: