-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
grid options renamed to columns
& maxRows
#1053
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
Merged
Merged
Conversation
This file contains hidden or 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
Created a sample for #810 with 30 columns, but not seeing issues in that PR. In the meantime I found those issues: * fix README talking about custom columns # * fix SASS code to handle >12 columns as you need to override stack-item min-width (we have 8.3333% otherwise = 1/12) * while testing incorrectly passed 'auto' for gridItem width (prop on grid cellHeight) so fixed code to handle wrong strings passed for x,y,w,h * updated test cases
* grid options `width` is now `columns`, and `height` is now `maxRows` which match what they are. * Old names are still supported for now (with console warnings) * updated test (required), samples (optional), readme * re-wrote entire custom column section. Hopefully much easier to find/use now.
columns
& maxRows
adumesny
commented
Nov 18, 2019
|
||
## Grid attributes | ||
|
||
- `data-gs-animate` - turns animation on | ||
- `data-gs-width` - amount of columns. Setting non-default value must be supported by equivalent change in CSS, [see docs here](https://github.com/gridstack/gridstack.js#change-grid-width). | ||
- `data-gs-height` - maximum rows amount. Default is `0` which means no maximum rows. | ||
- `data-gs-columns` - amount of columns. Setting non-default value must be supported by equivalent change in CSS, [see docs here](https://github.com/gridstack/gridstack.js#change-grid-columns). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we care about migrating those attr ? also not clear if that and options is set which ones wins.
This was referenced Nov 19, 2019
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
width
is nowcolumns
, andheight
is nowmaxRows
which match what they are.Created a sample for #810 with 30 columns, but not seeing issues in that PR (issue rounding cellWidth() with large # of columns). I was able to move and resize and things lined up as expected even when total width / 30 was close to .5 off
@nulen please update with info.
In the meantime I found those issues:
so fixed code to handle wrong strings/garbage passed for x,y,w,h as I was getting inf loop instead.
Checklist
yarn test
)also ran every demo samples, and the new 30 columns sample as well.