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

is there a way to change grid matrix? #903

Open
MoeMhanna opened this issue Jan 20, 2024 · 1 comment
Open

is there a way to change grid matrix? #903

MoeMhanna opened this issue Jan 20, 2024 · 1 comment

Comments

@MoeMhanna
Copy link

MoeMhanna commented Jan 20, 2024

if i have a large screen resolution the max cols is 3 but when it is resize to smaller resolution i need to make it as 2 cols
is there a way to do that ?

i tried this code but it didn't work
@HostListener('window:resize', ['$event']) onResize() { const width = window.innerWidth; if (width < 1500) { this.options.maxCols = 2; } else { this.options.maxCols = 3; this.options.maxRows = 12; } if (this.options.api && this.options.api.optionsChanged) { this.options.api.optionsChanged();\ } }

@MoeMhanna MoeMhanna changed the title updating the layout List getting the updated layout List when gridItem changed Jan 20, 2024
@MoeMhanna MoeMhanna changed the title getting the updated layout List when gridItem changed is there a way to change grid matrix? Jan 22, 2024
@lmarquinez
Copy link

lmarquinez commented Jan 25, 2024

Are you using as gridsterType fit option? you can also add a method in the gridSizeChangedCallback

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

No branches or pull requests

2 participants