web ui: don't automatically unfold search results (fixes performance issue with search)
@@ -64,21 +64,6 @@ const parseData = (getKey, sendNotification, instanceId, ls, kdb) => {
return parseDataSet(getKey, sendNotification, instanceId, tree)
}
-const getUnfolded = (searchResults) => {
- let unfolded = []
- for (let r of searchResults) {
- const parts = r.split('/')
- let path = ''
- for (let p of parts) {
- path = path.length === 0 ? p : (path + '/' + p)
- if (!unfolded.includes(path)) {
- unfolded.push(path)
- }
- }
- }
- return unfolded
-}
-
// configuration page
export default class Configuration extends Component {
constructor (props, ...rest) {
@@ -226,10 +211,6 @@ export default class Configuration extends Component {
? this.generateData({ ...this.props, ls: search.results })
: data
- const filteredInstance = (isSearching && hasResults)
- ? { ...instance, unfolded: getUnfolded(search.results) }
- : instance
-
return (
<Card style={{ padding: '8px 16px' }}>
<CardHeader
@@ -258,7 +239,7 @@ export default class Configuration extends Component {
</div>
: <TreeView
searching={isSearching || (search && search.clearing)}
- instance={filteredInstance}
+ instance={instance}
instanceId={id}
data={filteredData}
instanceVisibility={visibility}
