diff --git a/plugins/CoreHome/javascripts/dataTable.js b/plugins/CoreHome/javascripts/dataTable.js index d7d17b58a274321b5958cdef60adf278e142647d..45766feedb19eca8e571d05bae2686f7fb862f06 100644 --- a/plugins/CoreHome/javascripts/dataTable.js +++ b/plugins/CoreHome/javascripts/dataTable.js @@ -96,6 +96,7 @@ $.extend(DataTable.prototype, UIControl.prototype, { this.workingDivId = this._createDivId(); domElem.attr('id', this.workingDivId); + this.maxNumRowsToHandleEvents = 255; this.loadedSubDataTable = {}; this.isEmpty = $('.pk-emptyDataTable', domElem).length > 0; this.bindEventsAndApplyStyle(domElem); @@ -1546,6 +1547,9 @@ $.extend(DataTable.prototype, UIControl.prototype, { }, handleColumnHighlighting: function (domElem) { + if (!this.canHandleRowEvents(domElem)) { + return; + } var maxWidth = {}; var currentNthChild = null; @@ -1718,6 +1722,10 @@ $.extend(DataTable.prototype, UIControl.prototype, { }); }, + canHandleRowEvents: function (domElem) { + return domElem.find('table > tbody > tr').size() <= this.maxNumRowsToHandleEvents; + }, + handleRowActions: function (domElem) { this.doHandleRowActions(domElem.find('table > tbody > tr')); }, @@ -1862,6 +1870,10 @@ $.extend(DataTable.prototype, UIControl.prototype, { // also used in action data table doHandleRowActions: function (trs) { + if (!trs || trs.length > this.maxNumRowsToHandleEvents) { + return; + } + var self = this; var merged = $.extend({}, self.param, self.props);