Add minimize tree toggle

This commit is contained in:
Misode
2020-12-27 17:34:01 +01:00
parent 133aa53b2f
commit 29c347a20b
6 changed files with 15 additions and 1 deletions

View File

@@ -176,7 +176,9 @@ export const renderHtml: Hook<[any, Mounter], [string, string, string]> = {
let body = ''
if (typeof value === 'object' && value !== undefined && (!(node.optional() && value === undefined))) {
const activeFields = getActiveFields(path)
body = Object.keys(activeFields)
body = (App.treeMinimized.get()
? Object.keys(activeFields).filter(k => value[k] !== undefined)
: Object.keys(activeFields))
.filter(k => activeFields[k].enabled(path))
.map(k => {
const field = activeFields[k]