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
-
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
cols
value is not enough to achieve responsiveness as thex
andy
values 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 recalculatesx
andy
with the correct amount of columns for that breakpoint for the default items.Where it's really starting to get complicated, is the
x
andy
values for items saved in local storage. Because the order in the item array never changes, only their individualx
andy
values 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
width
and the amount ofcols
that corresponds to thecols
prop.Beta Was this translation helpful? Give feedback.
All reactions