-
Notifications
You must be signed in to change notification settings - Fork 171
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
Preserve span
when changing grid item positions
#6639
Comments
ruggi
added a commit
that referenced
this issue
Nov 14, 2024
**Problem:** `span` values for grid child positioning props are wiped when using `gridChangeElementLocationStrategy`. **Fix:** Rework the way grid element props are calculated when changing element location pins, so that `spans` are respected and kept in place if present. The behavior is now so that: - when it makes sense to do so, return shorthand versions of grid positioning props - when moving an element with `span` values, support moving them when the span is in the starting prop as well as the ending prop Examples for moving a item one cell to the right: | Initial config | Result | |------------|------------| | `gridColumn: 'span 2'` | `gridColumn: 'span 2 / 4'` | | `gridColumn: '2 / span 2'` | `gridColumn: '3 / span 2'` | | `gridColumnStart: 'span 2'` | `gridColumn: 'span 2 / 4'` | | `gridColumnEnd: 'span 2'` | `gridColumn: '3 / span 2'` | **Note:** a subsequent PR will take care of also keepign `span` intact for the reorder strategy. Fixes #6639
liady
pushed a commit
that referenced
this issue
Dec 13, 2024
**Problem:** `span` values for grid child positioning props are wiped when using `gridChangeElementLocationStrategy`. **Fix:** Rework the way grid element props are calculated when changing element location pins, so that `spans` are respected and kept in place if present. The behavior is now so that: - when it makes sense to do so, return shorthand versions of grid positioning props - when moving an element with `span` values, support moving them when the span is in the starting prop as well as the ending prop Examples for moving a item one cell to the right: | Initial config | Result | |------------|------------| | `gridColumn: 'span 2'` | `gridColumn: 'span 2 / 4'` | | `gridColumn: '2 / span 2'` | `gridColumn: '3 / span 2'` | | `gridColumnStart: 'span 2'` | `gridColumn: 'span 2 / 4'` | | `gridColumnEnd: 'span 2'` | `gridColumn: '3 / span 2'` | **Note:** a subsequent PR will take care of also keepign `span` intact for the reorder strategy. Fixes #6639
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
No description provided.
The text was updated successfully, but these errors were encountered: