文档说observeChanges的默认值为false。但它似乎将值设置为true。默认值是否仅在禁用排序插件时适用?
我们注意到由于这个原因多次调用渲染,并且想知道它是否可以显式设置为false。
这是jsfiddle:
GetMethod

$(document).ready(function() {
var container = document.getElementById('basic_example');
var data = function() {
return Handsontable.helper.createSpreadsheetData(10, 10);
};
var hot = new Handsontable(container, {
data: data(),
colHeaders: true,
rowHeaders: true,
stretchH: 'all',
columnSorting: true,
contextMenu: true
});
if (container.clientHeight < 500) {
container.height = container.clientHeight;
hot.updateSettings({
height: container.clientHeigh
});
hot.render();
}
setTimeout(function() {
var output = document.getElementById('output').innerHTML = hot.getSettings().observeChanges;
}, 1000);
});
&#13;
</style> <script src="https://code.jquery.com/jquery-1.11.1.min.js"></script> <link href="http://handsontable.com//styles/main.css" rel="stylesheet"> <link href="http://handsontable.com//bower_components/handsontable/dist/handsontable.full.css" rel="stylesheet"> <script src="http://handsontable.com//bower_components/handsontable/dist/handsontable.full.js"></script> <style type="text/css"> body {
background: white;
margin: 20px;
}
h2 {
margin: 20px 0;
}
div#basic_example {
border: 5px solid #ccc;
}
&#13;
点击此处查看jsfiddle:http://jsfiddle.net/mpusarla/nva6b8e8/1/