0
我有以下Webix組合:如何從Webix組合中的選定數據項獲取屬性?
{
view: "combo",
label: 'Select the name',
labelWidth:130,
options: {
data:[
{ itemId:"120", itemName:"Name 1"},
{ itemId:"121", itemName:"Name 2"}
],
body: { template: '#itemName#' }
},
on:{
onChange:function(id){ alert(id) }
}
}
它看起來就像必要的,但我怎麼能選擇新的項目後得到itemId
?我只能得到自動生成的ID
同樣的代碼片段:
http://webix.com/snippet/3a431f1c
提前感謝!
謝謝! (:在仔細檢查文檔後發現'getList()'而不是'getPopup()。getBody()',但兩者的工作方式是一樣的。 – Amarillo
是的,我忘了提到這一點。但是,你有解決方案:) – jayantish