-
Notifications
You must be signed in to change notification settings - Fork 171
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Preserve span when changing grid item position (#6633)
**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
- Loading branch information
Showing
9 changed files
with
415 additions
and
175 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.