EasyUI Forum
March 29, 2024, 06:00:45 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 Collapsible  (Read 4939 times)
yongchang
Newbie
*
Posts: 4


View Profile
« on: August 23, 2020, 07:09:48 PM »

How do I make the them all collapse by default?
Logged
jarry
Administrator
Hero Member
*****
Posts: 2260


View Profile Email
« Reply #1 on: August 25, 2020, 04:58:39 AM »

Please set the 'state' to 'closed' for all tree nodes.
Code:
[
      {
        id: 1,
        text: "My Documents",
        state: "closed",
        children: [
          {
            id: 11,
            text: "Photos",
            state: "closed",
            children: [
              {
                id: 111,
                text: "Friend"
              },
              {
                id: 112,
                text: "Wife"
              },
              {
                id: 113,
                text: "Company"
              }
            ]
          }
        ]
      }
    ];
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!