Expand first item of an array by default

This commit is contained in:
Jos de Jong 2020-10-10 14:22:00 +02:00
parent cc99284052
commit 002453cc92
1 changed files with 7 additions and 1 deletions

View File

@ -67,7 +67,13 @@ findRootPath
let selection = null
let clipboard = null
$: state = syncState(doc, state, [], (path) => path.length < 1)
$: state = syncState(doc, state, [], (path) => {
return path.length < 1
? true
: (path.length === 1 && path[0] === 0) // first item of an array?
? true
: false
})
$: validationErrorsList = validate ? validate(doc) : []
$: validationErrors = mapValidationErrors(validationErrorsList)