add itemAt function

pull/1/head
yann300 7 years ago
parent a927785830
commit f4353b7b09
  1. 6
      remix-debugger/src/ui/TreeView.js

@ -77,7 +77,7 @@ class TreeView {
formatData (key, data, children, expand, keyPath) {
var self = this
var li = yo`<li class=${css.li_tv}></li>`
var li = yo`<li key=${key} class=${css.li_tv}></li>`
var caret = yo`<div class="fa fa-caret-right caret ${css.caret_tv}"></div>`
var label = yo`
<div key=${key} class=${css.label_tv}>
@ -127,6 +127,10 @@ class TreeView {
}
}
itemAt (path) {
return this.view.querySelector(`li[key="${path}"]`)
}
labelAt (path) {
return this.view.querySelector(`div[key="${path}"]`)
}

Loading…
Cancel
Save