fix: makeWidget breakpoint layout issue #3071#3072
Merged
adumesny merged 3 commits intogridstack:masterfrom Jun 20, 2025
Merged
Conversation
adumesny
reviewed
Jun 11, 2025
src/gridstack-engine.ts
Outdated
| // IFF we're not in the middle of column resizing! | ||
| const saveOrig = (node.x || 0) + (node.w || 1) > this.column; | ||
| if (saveOrig && this.column < this.defaultColumn && !this._inColumnResize && !this.skipCacheUpdate && node._id && this.findCacheLayout(node, this.defaultColumn) === -1) { | ||
| if (saveOrig && this.column < this.defaultColumn && !this._inColumnResize && !this.skipCacheUpdate && !isNaN(node._id) && this.findCacheLayout(node, this.defaultColumn) === -1) { |
Member
There was a problem hiding this comment.
good catch!
node._id!==undefined or node._id?? might be less specific
Contributor
Author
adumesny
reviewed
Jun 11, 2025
src/gridstack.ts
Outdated
| el.gridstackNode = node; | ||
| node.el = el; | ||
| node.grid = this; | ||
| this.engine._loading = true; // help with collision |
Member
There was a problem hiding this comment.
this feels wrong and would have to debug it myself. too low level and could conflict with other proper calls
Contributor
Author
There was a problem hiding this comment.
removed it for now
1 task
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
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
fix #3071 for description of issue. I added setting _loading to true in _prepareElement to fix the order issue and changed how we check if
node._idis present (previously it would be false when called with the first element as it has an id of 0, not sure if this was wanted)Checklist
yarn test)