开发者

Custom ColumnTree node attributes

开发者 https://www.devze.com 2023-02-17 06:15 出处:网络
By default, ColumnTree uses these attributes for the nodes: text, id, leaf. So, the server sould sends something like

By default, ColumnTree uses these attributes for the nodes: text, id, leaf. So, the server sould sends something like

{
    id: 1,
    text: 'A leaf Node',
    leaf: true
}

What should i change in the ColumnTree options if my server sends custom params开发者_StackOverflow中文版? Like:

{
    n: 1,
    folder: 'A leaf Node',
    leaf: true
}


You can override the method createNode and assemble your own attributes hash from the data you received from the server. Check the example in the docs of Ext.tree.TreeLoader.createNode

0

精彩评论

暂无评论...
验证码 换一张
取 消