Skip to content
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

fix(resize): update the grid to resize when initialised in the smaller screen #2949

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

GowthamTG
Copy link
Contributor

@GowthamTG GowthamTG commented Feb 17, 2025

Description

This change would help recalculate the grid-layout when it is getting initialised in the smaller screen

#2947

Screen.Recording.Feb.17.2025.1.mov

Checklist

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

@GowthamTG GowthamTG changed the title inital resize of grid in smaller window fix(resize): update the grid to resize when initialised in the smaller screen Feb 17, 2025
@@ -346,8 +346,6 @@ export class GridStack {
opts = Utils.defaults(opts, defaults);
this._initMargin(); // part of settings defaults...

// Now check if we're loading into 1 column mode FIRST so we don't do un-necessary work (like cellHeight = width / 12 then go 1 column)
this.checkDynamicColumn();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this removes optimizations so this isn't the right fix even if it fixes the issue...

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.

2 participants