</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 =...
Please Whitelist JSFiddle in your content blocker.
Help keep JSFiddle free for always by one of two ways:
Whitelist JSFiddle in your content blocker (two clicks)
Go PRO and get access to additional PRO features →
Join the 4+ million users, and keep the JSFiddle dream alive.
Ad-free
All ads in the editor and listing pages are turned completely off.
Use pre-released features
You get to try and use features (like the Palette Color Generator) months before everyone else.
Fiddle collections
Sort and categorize your Fiddles into multiple collections.
Private collections and fiddles
You can make as many Private Fiddles, and Private Collections as you wish!
Console
Debug your Fiddle with a minimal built-in JavaScript console.