Prevent collapsing datasource if only one datasource exists
This commit is contained in:
parent
01cdfcd075
commit
95b29a6823
|
@ -22,10 +22,11 @@
|
||||||
const selected = $datasources.selected === datasource._id
|
const selected = $datasources.selected === datasource._id
|
||||||
const open = openDataSources.includes(datasource._id)
|
const open = openDataSources.includes(datasource._id)
|
||||||
const containsSelected = containsActiveEntity(datasource)
|
const containsSelected = containsActiveEntity(datasource)
|
||||||
|
const onlySource = $datasources.list.length === 1
|
||||||
return {
|
return {
|
||||||
...datasource,
|
...datasource,
|
||||||
selected,
|
selected,
|
||||||
open: selected || open || containsSelected,
|
open: selected || open || containsSelected || onlySource,
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
: []
|
: []
|
||||||
|
|
Loading…
Reference in New Issue