tree: add an input for filtering displayed widget by id

This commit is contained in:
bordun 2021-01-08 15:45:30 +01:00
parent 9dae9c5c9d
commit 420bd55e7a
6 changed files with 70 additions and 6 deletions

View file

@ -56,7 +56,7 @@ module.exports = {
if (selector.indexOf(' ') === -1 && selector.indexOf(',') === -1) {
if (selector.indexOf('#') === 0 && context === document) {
nodes = [document.getElementById(selector.substr(1, selector.length - 1))]
} else if (selector.indexOf('.') === 0) {
} else if (selector.lastIndexOf('.') === 0) {
nodes = context.getElementsByClassName(selector.substr(1, selector.length - 1))
}
}