Skip to content

Releases: cheton/infinite-tree

v0.8.1

10 Apr 15:04
Compare
Choose a tag to compare
  • Updates the constructor interface. Now it can accept the element el as the first parameter. For example:

    new InfiniteTree(document.getElementById('#tree'), { ... });
  • Adds a max height for the infinite-tree-content class as default

    .infinite-tree-content {
        max-height: 400px;
    }

v0.8.0

07 Apr 16:33
Compare
Choose a tag to compare

Functions

  • Removed addChildNodeAt
  • Added addChildNodes

v0.7.0

07 Apr 11:39
Compare
Choose a tag to compare

Adds loadNodes option to load nodes on demand

var tree = new InfiniteTree({
    el: document.querySelector('#tree'),
    data: [
        { // node
            id: '<node-id>',
            label: 'Node Label',
            // Set loadOnDemand to true if you want to load child nodes on demand
            loadOnDemand: true
        }
    ],
    loadNodes: function(parentNode, done) {
        var nodes = [
            {
                id: 'node1',
                label: 'Node 1'
            },
            {
                id: 'node2',
                label: 'Node 2'
            }
        ];
        setTimeout(function() {
            done(null, nodes);
        }, 1000);
    }
});

v0.6.3

07 Apr 08:32
Compare
Choose a tag to compare
  • Adds shouldSelectNode option to determine if a node can be selected or deselected

v0.6.2

06 Apr 11:29
Compare
Choose a tag to compare

This update supports Internet Explorer 8

You need to include the es5-shim polyfill (and optionally JSON3) for Internet Explorer 8, as shown below:

<script src="//cdnjs.cloudflare.com/ajax/libs/es5-shim/4.5.7/es5-shim.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/es5-shim/4.5.7/es5-sham.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/json3/3.3.2/json3.min.js"></script>

v0.6.1

06 Apr 08:35
Compare
Choose a tag to compare

This update contains bug fixes and adds support for Internet Explorer 9 Drag and Drop.

v0.6.0

06 Apr 06:32
Compare
Choose a tag to compare

Options

  • Added droppable option (Defaults to false)
  • Added selectable option (Defaults to true)
  • Added treeOptions as the 2nd parameter that will pass to the rowRenderer function

Events

  • Changed tree.on('drop', fn) to tree.on('dropNode', fn)

    tree.on('dropNode', function(node, evt) {
        // Handle drop node event
    });

v0.5.0

05 Apr 17:43
Compare
Choose a tag to compare

Adds droppable support

v0.4.0

04 Apr 15:29
Compare
Choose a tag to compare

Notable Changes

  • Added getRootNode
  • Added flattenNode
  • Added removeChildNodes
  • Added removeNode
  • Renamed flatten to flattenChildNodes

Other Changes

API Documentation:

v0.3.0

03 Apr 16:24
Compare
Choose a tag to compare

Notable Changes

  • Added getChildNodes to get a list of child nodes.
  • Added addChildNodeAt, appendChild, insertNodeAfter, and insertNodeBefore to insert a new node.
  • Added flatten to flatten parent-child nodes by performing full tree traversal using child-parent link.
  • Added updateNode to update the data of a node.
  • Added toString to serialize the current state of a node to a JSON string.

Other Changes

  • Update dependencies: flattree@^0.8.1
  • IE8 compatibility output