Skip to content

Expose a way to programmatically set the expanded state for arrays/objects #29

Closed
@dmackdev

Description

@dmackdev

Currently, JsonTreeResponse::reset_expanded allows consumers to reset the expanded state of arrays/objects to respect the DefaultExpand setting of the JsonTree (e.g. useful when a search term changes, to expand only the new matches and reset any user driven collapses/expansions).

It would also be useful to be able to reset or set the expanded/collapsed expanded state for individual arrays/objects, e.g. via a JsonPointer, and a method on the RenderContexts and/or JsonTreeResponse. This would be useful for the JSON Editor UI demo, to automatically expand arrays/objects to which a new value has just been added via the context menu, in order to reveal the new value (in case the enclosing array/object was collapsed).

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions