作为标题,没有滚动条甚至我做了下面的设置,我尝试滚动:“y”,滚动:“xy”,滚动:true,scrollX:true,scrollY:true等等都失败了。 我在想它是因为视图是“treetable”。 代码如下:
let dataTree = function(){
const config={
// container:"testA", //the container is the div Id going to contain the grid, we will addd it @ PlTreeGrid
view:"treetable",
//autowidth:true,
width:'100%',
//autoheight:true,
minHeight:530,
scroll:"xy",
scroll:"x",
scroll:"y",
scrollX:true,
scrollY:true,
columns:[
{ id:"id", header:"", css:{"text-align":"right"}, width:50, sort:"int"}, //,header:{ height:25 }
{ id:"value", header:"Film title", width:250,
template:"{common.treetable()} #value#", sort:"string" },
//{ id:"chapter", header:"Mode", sort:"string", template:"#value# <div class='edit'>Del</div>", width:300}//width:200, height:'auto'
{ id:"chapter", header:"Mode", sort:"string", width:'auto',fillspace:true}
],
onDblClick:{
"webix_remove_upload":function(ev, id){
console.log("ev,id");console.log(ev,id)
//this.remove(id);
}
},
data: [
{ "id":"1", "value":"The Shawshank Redemption", "open":true, "data":[
{ "id":"1.1", "value":"Part 1 l A", "chapter":"alpha"},
{ "id":"1.2", "value":"Part 2", "chapter":"beta", "open":true, "data":[
{ "id":"1.2.1", "value":"Part 1", "chapter":"beta-twin"}
]},
{ "id":"1.3", "value":"Part 3", "chapter":"gamma" }
]},
{ "id":"2", "value":"The Godfather", "data":[
{ "id":"2.1", "value":"Part 1", "chapter":"alpha" }
]}
]
}
let onItemDblClick = function(id, e, node){
alert("happy" + id, e, node);
}
return <TreeGrid config={config} onItemDblClick={onItemDblClick} />
答案 0 :(得分:1)
滚动条没有问题。
您在代码段中的代码:http://webix.com/snippet/78021640 我刚刚删除了任何“滚动”属性,使用默认属性。
滚动条仅在需要时显示。如果使用缩放器来减小treetable大小。当部分内容被隐藏时,滚动条将出现。