Git Product home page Git Product logo

sim-tree's People

Contributors

bubble-tip avatar gaborkalmar78 avatar linjingming avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

sim-tree's Issues

How to use destroy and refresh tree

I am using the simtree in salesforce lightning component and noticed one issue.
Whenever I select a node and save it, the data gets saved in back-end. However when I again launch the tree, I see the old selection on UI. Not sure what's the issue is, So I was wondering if there is a method to destroy/refresh the tree. If yes, please provide an example.

How to unexpand parent tree

here is my code ,and all the child node is expanded.
I want to unexpand all the child node?
how to do it
``
var tree = simTree({
el: '#tree',
data: list,
check: true,
linkParent: true,
//check: true,
onClick: function (item) {
console.log(item)
},
onChange: function (item) {
console.log(item)
}
});
})

``

Bold Element

Hi, i have question. It is possible use bold for one element on the tree and show only one element bold?
Example in id:13:
var list = [{
"id": '1',
"pid": '',
"name": "JavaScript",
},
{
"id": '11',
"pid": '1', // parent ID
"name": "Angular"
},
{
"id": '12',
"pid": '1',
"name": "React"
},{
"id": '13',
"pid": '1',
"name": "Vuejs",
"bold": "True"
},{
"id": '14',
"pid": '1',
"name": "jQueryScript.Net"
},
{
"id": '2',
"pid": '',
"name": "HTML5"
},
{
"id": '3',
"pid": '',
"name": "CSS3",
"disabled": true
}];
Thank you

[SOLVED] "checked":"checked" causing error for hierarchical trees

jquery-3.3.1.min.js:2 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 String.<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)
    at e.init (simTree.js:1)
oe.error @ jquery-3.3.1.min.js:2
oe.tokenize @ jquery-3.3.1.min.js:2
oe @ jquery-3.3.1.min.js:2
find @ jquery-3.3.1.min.js:2
(anonymous) @ simTree.js:1
each @ jquery-3.3.1.min.js:2
setSelected @ simTree.js:1
doRender @ simTree.js:1
render @ simTree.js:1
init @ simTree.js:1
e @ simTree.js:1
e @ simTree.js:1
complete @ allMap.js:120
parseChunk @ papaparse.min.js:7
_chunkLoaded @ papaparse.min.js:7
(anonymous) @ papaparse.min.js:7
load (async)
_readChunk @ papaparse.min.js:7
_nextChunk @ papaparse.min.js:7
stream @ papaparse.min.js:7
parse @ papaparse.min.js:7
loadVehiclesLookup @ allMap.js:85
(anonymous) @ allMap.js:63
l @ jquery-3.3.1.min.js:2
c @ jquery-3.3.1.min.js:2
setTimeout (async)
(anonymous) @ jquery-3.3.1.min.js:2
u @ jquery-3.3.1.min.js:2
fireWith @ jquery-3.3.1.min.js:2
fire @ jquery-3.3.1.min.js:2
u @ jquery-3.3.1.min.js:2
fireWith @ jquery-3.3.1.min.js:2
ready @ jquery-3.3.1.min.js:2
_ @ jquery-3.3.1.min.js:2

Upon adding "checked": "checked" setting to either parent or child nodes, this error happens and only the first node is checked; the error prevents from checking the other nodes.

When selected parent element, disabled child nodes are also getting selected

i have below structrue
var myData = [{
"id": '1',
"pid": '',
"name": "Root",
"disabled": true
},
{
"id": '1.1',
"pid": '1', // parent ID
"name": "Level 1"
},
{
"id": '1.1.1',
"pid": '1.1', // parent ID
"name": "Level 2",
"disabled": true
},
{
"id": '1.1.1.1',
"pid": '1.1', // parent ID
"name": "Level 2"
}];

In the above structure, Level 1 can be selectable and Level 2 with id 1.1.1.1 is selectable.

If directly parent node is selected, i.e 1.1, even 1.1.1 obj is getting selected, but it should not as its disabled.

IE Issue

Hi,

In IE, some child nodes are NOT displayed in treeview and it shows white space in UI. However, the node data is available in the HTML. The same data working fine with Chrome browser.
IE_Issue

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.