Skip to content

addWidget() while in 1 column fix#1720

Merged
adumesny merged 2 commits into
gridstack:masterfrom
adumesny:master
Apr 11, 2021
Merged

addWidget() while in 1 column fix#1720
adumesny merged 2 commits into
gridstack:masterfrom
adumesny:master

Conversation

@adumesny

Copy link
Copy Markdown
Member

Description

Checklist

  • Created tests which fail without the change (if possible)
  • All tests passing (yarn test)
  • Extended the README / documentation, if necessary

* before we modify the passed in layout, we make a (shallow) copy so sort() doesn't affect user's data
* also removed passing removeDOM to onChange() callback as we have node._removeDOM
* fix gridstack#1655
* `addWidget()` while in 1 column now remembers original wanted width
(saves in 12 column layout)
* removed uneeded _oneColumnMode (check for opts.column === 1)
* updated responsive demo to add a 4x1 widget
(test while in 1 column, size up back to 12 column)
@adumesny adumesny merged commit ebdc1a2 into gridstack:master Apr 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

addWidget in oneColumnMode and then resize to 12 -> width is always 1

1 participant