Handsontable FULL conf

Full configuration applied to HT.

by Gabriel Vazquez

HTML

<div>
  <div id="example1" class="hot handsontable htRowHeaders htColumnHeaders"></div>
</div>

CSS

</style><!-- Ugly Hack due to jsFiddle issue-->

<script src="https://docs.handsontable.com/pro/5.0.0/bower_components/handsontable-pro/dist/handsontable.full.min.js"></script><link type="text/css" rel="stylesheet" href="https://docs.handsontable.com/pro/5.0.0/bower_components/handsontable-pro/dist/handsontable.full.min.css">

JavaScript

function patchHOTHiddenPlugin(tableInstance) {
  var hiddenPlugin = tableInstance.getPlugin('hiddenColumns');
  if (hiddenPlugin._originalAfterGetCellMeta) {
    return;
  }
  // HOT Patch
  hiddenPlugin._originalAfterGetCellMeta = hiddenPlugin.onAfterGetCellMeta;
  hiddenPlugin.onAfterGetCellMeta = function onAfterGetCellMetaPatched(row, col, cellProperties) {
    var hiddenRenderer = Handsontable.renderers.hiddenRenderer;
    // Original code from HOT
    // Related issue: https://github.com/handsontable/handsontable-pro/issues/25
    // FIXME: When that issue will be resolved, update HOT and remove this patch
    // col = this.hot.runHooks('unmodifyCol', col);
    if (this.settings.copyPasteEnabled === false && this.isHidden(col)) {
      cellProperties.skipColumnOnPaste = true;
    }

    if (this.isHidden(col)) {
      if (cellProperties.renderer !== hiddenRenderer) {
        cellProperties.baseRenderer = cellProperties.renderer;
      }
      cellProperties.renderer = hiddenRenderer;
    } else if (cellProperties.baseRenderer !== null) {
      // We must pass undefined value too (for the purposes of inheritance cell/column settings).
      cellProperties.renderer = cellProperties.baseRenderer;
      cellProperties.baseRenderer = null;
    }

    if (this.isHidden(cellProperties.visualCol - 1)) {
      var firstSectionHidden = true;
      var i = cellProperties.visualCol - 1;

      cellProperties.className = cellProperties.className || '';

      if (cellProperties.className.indexOf('afterHiddenColumn') === -1) {
        cellProperties.className += ' afterHiddenColumn';
      }

      do {
        if (!this.isHidden(i)) {
          firstSectionHidden = false;
          break;
        }

        i--;
      } while (i >= 0);

      if (firstSectionHidden && cellProperties.className.indexOf('firstVisibleColumn') === -1) {
        cellProperties.className += ' firstVisibleColumn';
      }
    } else if (cellProperties.className) {
      var classArr =...