remove subfolder from the list of expanded path if a folder is collapsed

pull/5370/head
yann300 5 years ago committed by ioedeveloper
parent a3f3138124
commit 17e98611d6
  1. 2
      apps/remix-ide/src/app/ui/TreeView.js

@ -104,7 +104,7 @@ class TreeView {
if (self.isExpanded(keyPath)) { if (self.isExpanded(keyPath)) {
if (!self.expandPath.includes(keyPath)) self.expandPath.push(keyPath) if (!self.expandPath.includes(keyPath)) self.expandPath.push(keyPath)
} else { } else {
self.expandPath = self.expandPath.filter(path => path !== keyPath) self.expandPath = self.expandPath.filter(path => !path.startsWith(keyPath))
} }
} }
label.oncontextmenu = function (event) { label.oncontextmenu = function (event) {

Loading…
Cancel
Save