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

disable/enable method is not recursive #2105

Closed
ptorrent opened this issue Nov 14, 2022 · 4 comments · Fixed by #2122
Closed

disable/enable method is not recursive #2105

ptorrent opened this issue Nov 14, 2022 · 4 comments · Fixed by #2122

Comments

@ptorrent
Copy link

Hello !

It seems that disable/enable method is not recursive ?

If I call thoses methods on the main grid, subgrid will not be affected.

grid.enable()
grid.disable()

Maybe i'm doing something wrong ?

Thanks

@adumesny
Copy link
Member

adumesny commented Nov 14, 2022

I missed that. you may want to control children differently, so it needs an optional argument to be recursive (on by default)

@ptorrent
Copy link
Author

yes, It's what I was thinking. Actually I'm doing it manualy.

Thanks for your answer !

@adumesny
Copy link
Member

turns out not trivial as I also need to update enableMove(), enableResize(), setStatic() as well to deal with recursions... so 5+ methods. agrr.

adumesny added a commit to adumesny/gridstack.js that referenced this issue Dec 27, 2022
* fix gridstack#2105
* disable/enable/setStatic/enableMove/enableResize now all take an optional recurse flag to update sub-grids
@adumesny
Copy link
Member

fixed in next release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants