From 5f1c6541d65925938cb4ec0b04ace8469bdc242e Mon Sep 17 00:00:00 2001 From: yann300 Date: Tue, 13 Mar 2018 17:01:10 +0100 Subject: [PATCH 1/3] save keyPath for reference and not key --- remix-debugger/src/ui/TreeView.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/remix-debugger/src/ui/TreeView.js b/remix-debugger/src/ui/TreeView.js index a6e210ffa9..7601a707f3 100644 --- a/remix-debugger/src/ui/TreeView.js +++ b/remix-debugger/src/ui/TreeView.js @@ -77,32 +77,32 @@ class TreeView { formatData (key, data, children, expand, keyPath) { var self = this - var li = yo`
  • ` + var li = yo`
  • ` var caret = yo`
    ` var label = yo` -
    +
    ${caret} ${self.formatSelf(key, data, li)}
    ` li.appendChild(label) if (data.children) { - var list = yo`` + var list = yo`` list.style.display = 'none' caret.className = list.style.display === 'none' ? `fa fa-caret-right caret ${css.caret_tv}` : `fa fa-caret-down caret ${css.caret_tv}` label.onclick = function () { self.expand(keyPath) } label.oncontextmenu = function (event) { - self.event.trigger('nodeRightClick', [key, data, label, event]) + self.event.trigger('nodeRightClick', [keyPath, data, label, event]) } li.appendChild(list) } else { caret.style.visibility = 'hidden' label.oncontextmenu = function (event) { - self.event.trigger('leafRightClick', [key, data, label, event]) + self.event.trigger('leafRightClick', [keyPath, data, label, event]) } label.onclick = function (event) { - self.event.trigger('leafClick', [key, data, label, event]) + self.event.trigger('leafClick', [keyPath, data, label, event]) } } return li