Is it possible to set the different height for the treetable lines?

时间:2016-08-31 18:02:08

标签: javascript html css tree webix

Trying to get this with the Webix Treetable. I can only set fixed rowHeight property. So here I face two problems:

  • Height of the rows
  • Position of the 'plus' icons (always on top)

Current treetable config is

rowHeight:100, rowLineHeight:34,
  columns:[{ 
    id:"value", 
    template:"{common.treetable()} #value#", 
    fillspace:true 
}], 

Code sample: http://webix.com/snippet/23a6b79f

1 个答案:

答案 0 :(得分:1)

您可以在数据中使用$ height属性,例如示例。 如果您远程加载数据,显然可以通过它。

webix.ui({
  view:"treetable",
  rowHeight:100, rowLineHeight:34,
  columns:[{ 
    id:"value", 
    template:"{common.treetable()} #value#", 
    fillspace:true 
  }],    
  data: [{ 
    id:1,
    $height:30,
    value:"Root", 
    open:true, 
    data:[{ 
      id:"11", 
      value:"Text 1<br>Text 2<br>Text 3",
      data:[
        { id:"111", value:"Should be small too", $height:30}
      ]
    }]
  }]
});

http://webix.com/snippet/59a17d61