-
-
Notifications
You must be signed in to change notification settings - Fork 92
New issue
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
Support for inner width and height. #102
Comments
Hey @nixegend can you please expand upon your requirements here. I am not quite following you. Thanks! |
Perhaps he's asking about a height calculation which includes the height of children? I have an parent component with a height of about 1000px and it contains a child which has a height of 1800px. The parent component is actually https://github.com/STRML/react-grid-layout and these children are absolute, so it seems that I need to calculate the size of the grid and set its height to allow elements to flow after it (see also https://stackoverflow.com/questions/9061520/auto-height-on-parent-container-with-absolute-fixed-children). Are you familiar with this issue? If not, maybe I can create a small demonstration repo. |
Hey @felthy that makes sense yeah. I don't know the specifics on |
Oh sorry the |
+1 It would be really nice to have this feature! |
+1, I think the SizeMe component's children function could be provided one more argument: the dom element to be measured, using this element it could be easy to get the paddings. namely: <SizeMe>
{({ size, el }) => ... }
<SizeMe> |
Need this as well. Is this project still maintained @ctrlplusb ? might work on an implementation of this anyway in near future causeI need it for a project |
Yep, still maintained, just haven't need to update it very often as it's quite stable. Happy to consider a discussion / PR on the subject. If it doesn't affect performance adversely we can include it. |
Thanks for your reply. I will do some research on it. Regarding performance I think it can cause a second render-cycle. It needs to be ensured that it does not result in a endless loop. The reason for this is:
Haven't thought further through it but whenever the child manipulates the parent, I guess an endless cycle can occure. |
It should be possible to track inner width and height.
The text was updated successfully, but these errors were encountered: