Skip to content

feat: Add expandAll/collapseAll support#27

Merged
araujoigor merged 2 commits into
araujoigor:masterfrom
MarcOrfilaCarreras:master
May 24, 2026
Merged

feat: Add expandAll/collapseAll support#27
araujoigor merged 2 commits into
araujoigor:masterfrom
MarcOrfilaCarreras:master

Conversation

@MarcOrfilaCarreras

Copy link
Copy Markdown
Contributor

This PR adds support for programmatically expanding and collapsing all nested tables.

Changes

  • Added JSONGrid.prototype.expandAll
  • Added JSONGrid.prototype.collapseAll
  • Added README documentation for the new API methods
  • Fixed README typos and improved wording

Example

var jsonGrid = new JSONGrid(data, container);

jsonGrid.render();

// Collapse all nested grids
jsonGrid.collapseAll();

// Expand all nested grids
jsonGrid.expandAll();

@araujoigor araujoigor merged commit fc69a63 into araujoigor:master May 24, 2026
@araujoigor

Copy link
Copy Markdown
Owner

Thanks for the contribution (and for fixing the spelling mistakes :))

@araujoigor

araujoigor commented May 24, 2026

Copy link
Copy Markdown
Owner

@MarcOrfilaCarreras maybe add some tests if you have the time. Should be easy to test your feature.

PS: I know I haven't added tests myself lol.

@MarcOrfilaCarreras

Copy link
Copy Markdown
Contributor Author

@araujoigor Sorry for the delay. I’ve opened PR #37.

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