Skip to content

Commit 58d40f9

Browse files
committed
update version number to 5.1.7
1 parent 37ece1b commit 58d40f9

10 files changed

+67
-65
lines changed

bower.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "tabulator",
33
"main": "dist/js/tabulator.js",
4-
"version": "5.1.6",
4+
"version": "5.1.7",
55
"description": "Interactive table generation JavaScript library",
66
"keywords": [
77
"table",

dist/js/tabulator.js

Lines changed: 56 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* Tabulator v5.1.6 (c) Oliver Folkerd 2022 */
1+
/* Tabulator v5.1.7 (c) Oliver Folkerd 2022 */
22
(function (global, factory) {
33
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
44
typeof define === 'function' && define.amd ? define(factory) :
@@ -2604,11 +2604,13 @@
26042604
}, {
26052605
key: "vertScrollListen",
26062606
value: function vertScrollListen() {
2607-
var _this2 = this;
2608-
2609-
this.subscribe("scroll-vertical", function () {
2610-
_this2.visibleRows = null;
2611-
});
2607+
this.subscribe("scroll-vertical", this.clearVisRowCache.bind(this));
2608+
this.subscribe("data-refreshed", this.clearVisRowCache.bind(this));
2609+
}
2610+
}, {
2611+
key: "clearVisRowCache",
2612+
value: function clearVisRowCache() {
2613+
this.visibleRows = null;
26122614
} //////////////////////////////////////
26132615
///////// Public Functions ///////////
26142616
//////////////////////////////////////
@@ -2644,7 +2646,7 @@
26442646
}, {
26452647
key: "rerenderColumns",
26462648
value: function rerenderColumns(update, blockRedraw) {
2647-
var _this3 = this;
2649+
var _this2 = this;
26482650

26492651
var old = {
26502652
cols: this.columns,
@@ -2671,26 +2673,26 @@
26712673
config.rightPos = colPos + width;
26722674
config.width = width;
26732675

2674-
if (_this3.isFitData) {
2676+
if (_this2.isFitData) {
26752677
config.fitDataCheck = column.modules.vdomHoz ? column.modules.vdomHoz.fitDataCheck : true;
26762678
}
26772679

2678-
if (colPos + width > _this3.vDomScrollPosLeft && colPos < _this3.vDomScrollPosRight) {
2680+
if (colPos + width > _this2.vDomScrollPosLeft && colPos < _this2.vDomScrollPosRight) {
26792681
//column is visible
2680-
if (_this3.leftCol == -1) {
2681-
_this3.leftCol = _this3.columns.length;
2682-
_this3.vDomPadLeft = colPos;
2682+
if (_this2.leftCol == -1) {
2683+
_this2.leftCol = _this2.columns.length;
2684+
_this2.vDomPadLeft = colPos;
26832685
}
26842686

2685-
_this3.rightCol = _this3.columns.length;
2687+
_this2.rightCol = _this2.columns.length;
26862688
} else {
26872689
// column is hidden
2688-
if (_this3.leftCol !== -1) {
2689-
_this3.vDomPadRight += width;
2690+
if (_this2.leftCol !== -1) {
2691+
_this2.vDomPadRight += width;
26902692
}
26912693
}
26922694

2693-
_this3.columns.push(column);
2695+
_this2.columns.push(column);
26942696

26952697
column.modules.vdomHoz = config;
26962698
colPos += width;
@@ -2754,7 +2756,7 @@
27542756
}, {
27552757
key: "dataChange",
27562758
value: function dataChange() {
2757-
var _this4 = this;
2759+
var _this3 = this;
27582760

27592761
var change = false,
27602762
collsWidth = 0,
@@ -2773,7 +2775,7 @@
27732775
if (change && this.table.rowManager.getDisplayRows().length) {
27742776
this.vDomScrollPosRight = this.scrollLeft + this.elementVertical.clientWidth + this.windowBuffer;
27752777
var row = this.chain("rows-sample", [1], [], function () {
2776-
return _this4.table.rowManager.getDisplayRows();
2778+
return _this3.table.rowManager.getDisplayRows();
27772779
})[0];
27782780

27792781
if (row) {
@@ -2809,7 +2811,7 @@
28092811
}, {
28102812
key: "reinitChanged",
28112813
value: function reinitChanged(old) {
2812-
var _this5 = this;
2814+
var _this4 = this;
28132815

28142816
var match = true;
28152817

@@ -2818,7 +2820,7 @@
28182820
}
28192821

28202822
old.cols.forEach(function (col, i) {
2821-
if (col !== _this5.columns[i]) {
2823+
if (col !== _this4.columns[i]) {
28222824
match = false;
28232825
}
28242826
});
@@ -2827,11 +2829,11 @@
28272829
}, {
28282830
key: "reinitializeRows",
28292831
value: function reinitializeRows() {
2830-
var _this6 = this;
2832+
var _this5 = this;
28312833

28322834
var rows = this.getVisibleRows();
28332835
rows.forEach(function (row) {
2834-
_this6.reinitializeRow(row, true);
2836+
_this5.reinitializeRow(row, true);
28352837
});
28362838
}
28372839
}, {
@@ -2875,33 +2877,33 @@
28752877
}, {
28762878
key: "addColRight",
28772879
value: function addColRight() {
2878-
var _this7 = this;
2880+
var _this6 = this;
28792881

28802882
var changes = false;
28812883

28822884
var _loop = function _loop() {
2883-
var column = _this7.columns[_this7.rightCol + 1];
2885+
var column = _this6.columns[_this6.rightCol + 1];
28842886

28852887
if (column) {
2886-
if (column.modules.vdomHoz.leftPos <= _this7.vDomScrollPosRight) {
2888+
if (column.modules.vdomHoz.leftPos <= _this6.vDomScrollPosRight) {
28872889
changes = true;
28882890

2889-
_this7.getVisibleRows().forEach(function (row) {
2891+
_this6.getVisibleRows().forEach(function (row) {
28902892
if (row.type !== "group") {
28912893
var cell = row.getCell(column);
28922894
row.getElement().appendChild(cell.getElement());
28932895
cell.cellRendered();
28942896
}
28952897
});
28962898

2897-
_this7.fitDataColActualWidthCheck(column);
2899+
_this6.fitDataColActualWidthCheck(column);
28982900

2899-
_this7.rightCol++; // Don't move this below the >= check below
2901+
_this6.rightCol++; // Don't move this below the >= check below
29002902

2901-
if (_this7.rightCol >= _this7.columns.length - 1) {
2902-
_this7.vDomPadRight = 0;
2903+
if (_this6.rightCol >= _this6.columns.length - 1) {
2904+
_this6.vDomPadRight = 0;
29032905
} else {
2904-
_this7.vDomPadRight -= column.getWidth();
2906+
_this6.vDomPadRight -= column.getWidth();
29052907
}
29062908
} else {
29072909
return "break";
@@ -2924,39 +2926,39 @@
29242926
}, {
29252927
key: "addColLeft",
29262928
value: function addColLeft() {
2927-
var _this8 = this;
2929+
var _this7 = this;
29282930

29292931
var changes = false;
29302932

29312933
var _loop2 = function _loop2() {
2932-
var column = _this8.columns[_this8.leftCol - 1];
2934+
var column = _this7.columns[_this7.leftCol - 1];
29332935

29342936
if (column) {
2935-
if (column.modules.vdomHoz.rightPos >= _this8.vDomScrollPosLeft) {
2937+
if (column.modules.vdomHoz.rightPos >= _this7.vDomScrollPosLeft) {
29362938
changes = true;
29372939

2938-
_this8.getVisibleRows().forEach(function (row) {
2940+
_this7.getVisibleRows().forEach(function (row) {
29392941
if (row.type !== "group") {
29402942
var cell = row.getCell(column);
29412943
row.getElement().prepend(cell.getElement());
29422944
cell.cellRendered();
29432945
}
29442946
});
29452947

2946-
_this8.leftCol--; // don't move this below the <= check below
2948+
_this7.leftCol--; // don't move this below the <= check below
29472949

2948-
if (_this8.leftCol <= 0) {
2950+
if (_this7.leftCol <= 0) {
29492951
// replicating logic in addColRight
2950-
_this8.vDomPadLeft = 0;
2952+
_this7.vDomPadLeft = 0;
29512953
} else {
2952-
_this8.vDomPadLeft -= column.getWidth();
2954+
_this7.vDomPadLeft -= column.getWidth();
29532955
}
29542956

2955-
var diff = _this8.fitDataColActualWidthCheck(column);
2957+
var diff = _this7.fitDataColActualWidthCheck(column);
29562958

29572959
if (diff) {
2958-
_this8.scrollLeft = _this8.elementVertical.scrollLeft = _this8.elementVertical.scrollLeft + diff;
2959-
_this8.vDomPadRight -= diff;
2960+
_this7.scrollLeft = _this7.elementVertical.scrollLeft = _this7.elementVertical.scrollLeft + diff;
2961+
_this7.vDomPadRight -= diff;
29602962
}
29612963
} else {
29622964
return "break";
@@ -2979,18 +2981,18 @@
29792981
}, {
29802982
key: "removeColRight",
29812983
value: function removeColRight() {
2982-
var _this9 = this;
2984+
var _this8 = this;
29832985

29842986
var changes = false;
29852987

29862988
var _loop3 = function _loop3() {
2987-
var column = _this9.columns[_this9.rightCol];
2989+
var column = _this8.columns[_this8.rightCol];
29882990

29892991
if (column) {
2990-
if (column.modules.vdomHoz.leftPos > _this9.vDomScrollPosRight) {
2992+
if (column.modules.vdomHoz.leftPos > _this8.vDomScrollPosRight) {
29912993
changes = true;
29922994

2993-
_this9.getVisibleRows().forEach(function (row) {
2995+
_this8.getVisibleRows().forEach(function (row) {
29942996
if (row.type !== "group") {
29952997
var cell = row.getCell(column);
29962998

@@ -3002,8 +3004,8 @@
30023004
}
30033005
});
30043006

3005-
_this9.vDomPadRight += column.getWidth();
3006-
_this9.rightCol--;
3007+
_this8.vDomPadRight += column.getWidth();
3008+
_this8.rightCol--;
30073009
} else {
30083010
return "break";
30093011
}
@@ -3025,18 +3027,18 @@
30253027
}, {
30263028
key: "removeColLeft",
30273029
value: function removeColLeft() {
3028-
var _this10 = this;
3030+
var _this9 = this;
30293031

30303032
var changes = false;
30313033

30323034
var _loop4 = function _loop4() {
3033-
var column = _this10.columns[_this10.leftCol];
3035+
var column = _this9.columns[_this9.leftCol];
30343036

30353037
if (column) {
3036-
if (column.modules.vdomHoz.rightPos < _this10.vDomScrollPosLeft) {
3038+
if (column.modules.vdomHoz.rightPos < _this9.vDomScrollPosLeft) {
30373039
changes = true;
30383040

3039-
_this10.getVisibleRows().forEach(function (row) {
3041+
_this9.getVisibleRows().forEach(function (row) {
30403042
if (row.type !== "group") {
30413043
var cell = row.getCell(column);
30423044

@@ -3048,8 +3050,8 @@
30483050
}
30493051
});
30503052

3051-
_this10.vDomPadLeft += column.getWidth();
3052-
_this10.leftCol++;
3053+
_this9.vDomPadLeft += column.getWidth();
3054+
_this9.leftCol++;
30533055
} else {
30543056
return "break";
30553057
}

dist/js/tabulator.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/js/tabulator.min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/js/tabulator.min.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/js/tabulator_esm.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* Tabulator v5.1.6 (c) Oliver Folkerd 2022 */
1+
/* Tabulator v5.1.7 (c) Oliver Folkerd 2022 */
22
class CoreFeature{
33

44
constructor(table){

dist/js/tabulator_esm.min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/js/tabulator_esm.min.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "tabulator-tables",
3-
"version": "5.1.6",
3+
"version": "5.1.7",
44
"description": "Interactive table generation JavaScript library",
55
"style": "dist/css/tabulator.css",
66
"main": "dist/js/tabulator.js",

0 commit comments

Comments
 (0)