请在http://jsfiddle.net/rajivseelam/zfmdu4wt/5/检查小提琴
我正在使用select2 3.5.2和handsontable latest。
要将select2下拉列表添加到handsontable,我使用了https://github.com/trebuchetty/Handsontable-select2-editor
查看问题的步骤:
单击“成本”列下的空单元格,将显示一个下拉列表,其中包含“固定”和“可变”选项。
再次点击同一个单元格,它会显示下拉列表,但会跳出单元格。
以下控件可控制handsontable中的下拉列表:
{
data: 'cost',
editor: 'select2',
renderer: customDropdownRenderer,
select2Options: {
data: [{id:'fixed',text:'Fixed'},{id:'variable',text:'Variable'}] ,
dropdownAutoWidth: true,
}
},
我一直在努力解决这个问题,但我做不到。如果有任何帮助将不胜感激。
最佳答案
试着评论下一行
this.$textarea.offset($(this.TD.offset());
在select2-editor.js中(Select2Editor.prototype.open函数)