Handsontable 列属性阻止数据显示

Handsontable columns attribute prevents data display

根据文档 here,我正在尝试在我的 table.

中添加一个下拉菜单

以下代码在没有 columns 属性的情况下也能正常工作。

function getData(obj){
  $('body')
    .append('<div id="Hot" class="hot handsontable htColumnHeaders"></div>');
  var container = document.getElementById('Hot'),hot;
  hot2 = new Handsontable(container, {
    data:[{
          "_____DELETE_____" :"No"
           ,"CMPCODE" :"H54"
           ,"CODE" :"666"
           ,"IFRS_HIERARCHY" :"Goodwill"
         }]
    ,colHeaders: ["_____DELETE_____","CMPCODE","CODE","IFRS_Hierarchy"]
    /* the line below prevents data being displayed */
    ,columns: [{type: 'dropdown',source: ['No','Yes']},{},{},{}]
  });
};

它也不是空值 ({}),因为它不仅仅适用于 _____DELETE_____ 列。

我一定是遗漏了一些明显的东西,但看不到!我正在使用 .js / .css 文件的 v0.20.1。

编辑 - 创建了一个 fiddle: http://jsfiddle.net/rawfocus/22ubvxaa/

破解..每个元素都需要引用它所引用的实际列,例如:

  var container = document.getElementById('example1'),hot;
  hot2 = new Handsontable(container, {
    data:[{
          "_____DELETE_____" :"No"
           ,"CMPCODE" :"H54"
           ,"CODE" :"666"
           ,"IFRS_HIERARCHY" :"Goodwill"
         }]
    ,colHeaders: ["_____DELETE_____","CMPCODE","CODE","IFRS_Hierarchy"]
    /* the line below is working now :-)  */
    ,columns: [
        {data:"_____DELETE_____"
             ,type:'dropdown',source: ["No",'Yes']}
         ,{data:"CMPCODE"}
         ,{data:"CODE"}
         ,{data:"IFRS_HIERARCHY"}
    ]
  });

Fiddle: http://jsfiddle.net/rawfocus/22ubvxaa/2/