grid-box-item width defaulting to 0 #52
-
I have been setting up my project to use the grid layout but I keep seeming to run into this problem. when the page is navigated to the layout is loaded and then the grid layout is set. but on the page all of the grid items widths is set to 0. I can go through inspect element and adjust the attribute manually which makes it visible. and then when I grab the box and let go, all of the boxes will adjust and move to the proper width and location on the screen. This is an Ionic application. has anyone ran into a similar issue? I have the resize subscription set up the same way as the playground stackblitz. I can add a demo of what I am talking about if that would help. thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
It would be nice to have a reproduction of the issue, so it can be easily identified. Said that, it seems that you are creating the grid in some HTML element that isn't already in the DOM, or if it is, it may be hidden or without any width. If that is the case, I would create the grid when the DOM node is attached or when the node is visible. If that is not the cose or if you still struggle to make it work properly, please recreate the issue on an stack-blitz or similar, it would be easy to identify. |
Beta Was this translation helpful? Give feedback.
It would be nice to have a reproduction of the issue, so it can be easily identified. Said that, it seems that you are creating the grid in some HTML element that isn't already in the DOM, or if it is, it may be hidden or without any width. If that is the case, I would create the grid when the DOM node is attached or when the node is visible.
If that is not the cose or if you still struggle to make it work properly, please recreate the issue on an stack-blitz or similar, it would be easy to identify.