Prevent collapsing datasource if only one datasource exists

This commit is contained in:
Andrew Kingston 2022-03-23 10:17:52 +00:00
parent 8cfad1a4ff
commit af1c01fdd1
1 changed files with 2 additions and 1 deletions

View File

@ -22,10 +22,11 @@
const selected = $datasources.selected === datasource._id
const open = openDataSources.includes(datasource._id)
const containsSelected = containsActiveEntity(datasource)
const onlySource = $datasources.list.length === 1
return {
...datasource,
selected,
open: selected || open || containsSelected,
open: selected || open || containsSelected || onlySource,
}
})
: []