EasyUI Forum
April 29, 2024, 07:35:57 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Tree json bug  (Read 6882 times)
Lioncat
Newbie
*
Posts: 4


View Profile Email
« on: April 05, 2016, 05:32:05 PM »

Using demo/lines.html, change data-options="url:'tree_data1.json' to following json which is the example on your Tree  Documentation, would be rendered as this:, the folder "Sub Bookds" will get into infinite loop to root node when open it
Code:
[{
    "id":1,
    "text":"Folder1",
    "iconCls":"icon-save",
    "children":[{
        "text":"File1",
        "checked":true
    },{
        "text":"Books",
        "state":"open",
        "attributes":{
            "url":"/demo/book/abc",
            "price":100
        },
        "children":[{
            "text":"PhotoShop",
            "checked":true
        },{
            "id": 8,
            "text":"Sub Bookds",
            "state":"closed"
        }]
    }]
},{
    "text":"Languages",
    "state":"closed",
    "children":[{
        "text":"Java"
    },{
        "text":"C#"
    }]
}]
Logged
jarry
Administrator
Hero Member
*****
Posts: 2262


View Profile Email
« Reply #1 on: April 06, 2016, 04:09:07 AM »

You can not set the 'closed' state for a leaf node, please try this code instead.
Code:
        },{
            "id": 8,
            "text":"Sub Bookds",
            "state":"open"
        }]
Logged
Lioncat
Newbie
*
Posts: 4


View Profile Email
« Reply #2 on: April 06, 2016, 04:57:19 AM »

This is the example on your Tree  Documentation
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!