Handsontable issue #71

https://github.com/handsontable/handsontable-pro/issues/71

by Nicolas Lips

HTML

<script src="https://docs.handsontable.com/pro/1.18.1/bower_components/handsontable-pro/dist/handsontable.full.min.js"></script>
<link rel="stylesheet" href="https://docs.handsontable.com/pro/1.18.1/bower_components/handsontable-pro/dist/handsontable.full.min.css">
<div>
  <div id="hot"></div>
</div>

JavaScript

var hotElement = document.querySelector('#hot');
var hotElementContainer = hotElement.parentNode;
var hotSettings = {
  data: [
  	{ 
    	id: '1', name: 'aaa'
    }, {
    	id: '2', name: 'bbb'
    }, { 
    	id: '3', name: 'ccc'
    }, {
    	id: '4', name: 'ddd'
    }
  ],
  columns:  [
      { title: "id", data: 'id' },
      { title: "name", data: 'name' },
  ],
  manualColumnResize: true,
  rowHeaders: true,
  beforeColumnResize: function(colIndex, newSize, isDblClick) {
    	var args = {
      	colIndex: colIndex,
        newSize: newSize,
        isDblClick: isDblClick
      };
      alert("beforeColumnResize arguments:\n" + JSON.stringify(args));
      return true;
    }
};
var hot = new Handsontable(hotElement, hotSettings);