EasyUI Forum

General Category => EasyUI for React => Topic started by: yongchang on August 23, 2020, 07:09:48 PM



Title: Tree Collapsible
Post by: yongchang on August 23, 2020, 07:09:48 PM
How do I make the them all collapse by default?


Title: Re: Tree Collapsible
Post by: jarry 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"
              }
            ]
          }
        ]
      }
    ];