Fix toggle bug
This commit is contained in:
parent
3f814c6a9b
commit
64c63e9e7f
|
@ -42,6 +42,7 @@
|
|||
containsSelected,
|
||||
dataSourceVisibility,
|
||||
searchTerm,
|
||||
onlyOneSource,
|
||||
}) => {
|
||||
if (searchTerm) {
|
||||
return true
|
||||
|
@ -51,6 +52,10 @@
|
|||
return dataSourceVisibility
|
||||
}
|
||||
|
||||
if (onlyOneSource) {
|
||||
return true
|
||||
}
|
||||
|
||||
return selected || containsSelected
|
||||
}
|
||||
|
||||
|
@ -102,6 +107,7 @@
|
|||
containsSelected,
|
||||
dataSourceVisibility: dataSourcesVisibility[datasource._id],
|
||||
searchTerm,
|
||||
onlyOneSource: onlySource,
|
||||
})
|
||||
return {
|
||||
...datasource,
|
||||
|
@ -131,8 +137,7 @@
|
|||
}
|
||||
|
||||
function toggleNode(datasource) {
|
||||
dataSourcesVisibility[datasource._id] =
|
||||
!dataSourcesVisibility[datasource._id]
|
||||
dataSourcesVisibility[datasource._id] = !datasource.open
|
||||
}
|
||||
|
||||
const containsActiveEntity = (
|
||||
|
|
Loading…
Reference in New Issue