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