Responsive Grid #74
Unanswered
slinky-bass
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello again!
Thank you so much for your quick reply to my previous question. I am making good progress with my grid, but have come up against something I'm hoping you can help clarify.
I'm looking at grid responsiveness and dynamic columns. I've found that dynamically updating the
colsvalue is not enough to achieve responsiveness as thexandyvalues of the item stay the same based on the original amount of grid cols. I've got a solution now that keeps track of the current breakpoint and recalculatesxandywith the correct amount of columns for that breakpoint for the default items.Where it's really starting to get complicated, is the
xandyvalues for items saved in local storage. Because the order in the item array never changes, only their individualxandyvalues as they are dragged, it makes it almost impossible to easily recalculate these values if the column value changes.Is there something that I'm missing that makes this easier? I know in the original repo, you can provide both a
widthand the amount ofcolsthat corresponds to thecolsprop.Beta Was this translation helpful? Give feedback.
All reactions