Prevent collapsing datasource if only one datasource exists
This commit is contained in:
parent
8cfad1a4ff
commit
af1c01fdd1
|
@ -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