2016-08-09 40 views
0

我想在Webix表過濾器添加一個佔位符,像下一個:如何將佔位符設置爲表格過濾器?

columns:[ 
    { 
     id:"title", header:["Film title", { 
     content:"richSelectFilter", // placeholder:"Select the movie..." doesn't work 
     }], width:300 
    },  
    { id:"rating", header:"Rating", width:100 } 
] 

樣品:http://webix.com/snippet/cac752a6

這適用於通常的richSelect小部件,但我不能找到一種方法來改變配置相同的表格過濾器。可能嗎?謝謝。

回答

2

您可以使用如下代碼旁邊設置佔位符的豐富選擇濾波器

columns:[ 
{ 
    id:"title", header:["Film title", { 
    content:"richSelectFilter", inputConfig:{ placeholder: "text here" } 
    }], width:300 
}, 

http://webix.com/snippet/58b054a2

,或者,如果你想改變佔位動態

var select = $$("d1").getFilter("title"); 
select.define("placeholder", "Some text here"); 
select.refresh(); 

http://webix.com/snippet/bd31c1f6

相關問題