linjingming / sim-tree

一个操作简单的基于jquery的树展示插件,支持异步展示子节点
MIT License
24 stars 3 forks source link

Need a way to set default selected values #1

Closed DevNakul closed 5 years ago

DevNakul commented 5 years ago

Need a way to set default selected values. So that when the tree is loaded, we can set default selection.

DevNakul commented 5 years ago

There is already a support for this. "checked": 'checked'

answerquest commented 4 years ago

Not working for me.. getting this error:

Uncaught Error: Syntax error, unrecognized expression: [data-id=VeeVee Cabs]
    at Function.oe.error (jquery-3.3.1.min.js:2)
    at oe.tokenize (jquery-3.3.1.min.js:2)
    at Function.oe [as find] (jquery-3.3.1.min.js:2)
    at w.fn.init.find (jquery-3.3.1.min.js:2)
    at expandNode (simTree.js:1)
    at Number.<anonymous> (simTree.js:1)
    at Function.each (jquery-3.3.1.min.js:2)
    at e.setSelected (simTree.js:1)
    at e.doRender (simTree.js:1)
    at e.render (simTree.js:1)

.. when I make a hierarchical list. When its a flat list, it works.