masterCheckbox在数据表中

问题描述:

我正在尝试将一个masterCheckbox添加到webix datatable项目中。现在,我得到以下行为:当我点击主复选框,值重写为1或0

I'm trying to add a masterCheckbox to the webix datatable items. For now, I got the following behavior: when I click on the master checkbox, the values rewrite to 1 or 0

{ 
    id:"title", 
    checkValue:"on", 
    uncheckValue:"off", 
    template:"{common.checkbox()} #title#", 
    header:["Title", {content:"masterCheckbox", contentId:"checkAll"}],
    fillspace:true
}

http://webix.com/snippet/26750201

Aby想到我在做错什么?

Aby idea what I'm doing wrong?

p>我找到的masterCheckbox的唯一示例是此示例

The only example with the masterCheckbox I found is this sample.

看起来像masterCheckbox更改当前列中的 。即在中$ c>中$ c> c $ c>我想提供的用例是使用 {common.checkbox()} 单独的列:

Seems like the masterCheckbox changes the value in the current column. I.e. in your sample title becomes on or off. I suppose the provided use-case is to have a separate column with {common.checkbox()}:

columns:[
  { id:"ch1", header:{ content:"masterCheckbox", contentId:"mc1" }, template:"{common.checkbox()}", width:40}      
],    

示例: http://webix.com/snippet/17a28a40