josdejong / svelte-jsoneditor

A web-based tool to view, edit, format, repair, query, transform, and validate JSON
https://jsoneditoronline.org
Other
820 stars 108 forks source link

`expand` should only expand? #247

Closed AlabasterAxe closed 1 year ago

AlabasterAxe commented 1 year ago

I'm running into an issue where I'd like to expand newly added elements but preserve the expansion status of existing elements. The current behavior of expand to collapse if returning false is making this difficult to implement. Ideally, expand would only ever expand or do nothing. I think it would be reasonable to have an alternate collapse function that has the opposite behavior.