dynamic-virtual-scroller
Advanced tools
Comparing version 3.0.24 to 3.0.25
{ | ||
"name": "dynamic-virtual-scroller", | ||
"version": "3.0.24", | ||
"version": "3.0.25", | ||
"description": "A virtual scroller for the web that can handle dynamic row and column sizes.", | ||
@@ -5,0 +5,0 @@ "main": "virtual-scroller.js", |
@@ -386,2 +386,14 @@ import {ATTRIBUTES, EVENTS, CLASSES, DATA} from "./constants"; | ||
}, | ||
removeRows: function (params) { | ||
params = validateParameters(params, { | ||
rowIndices: {type: 'array'} | ||
}); | ||
// We need to remove the last index first, otherwise the removal would affect the other indices | ||
var sortedIndices = _.reverse(_.sortBy(params.rowIndices)); | ||
_.forEach(sortedIndices, function (rowIndex) { | ||
renderManager.removeItemAt({rowIndex: rowIndex}); | ||
}); | ||
renderManager.render(scrollManager); // render more items underneith | ||
}, | ||
removeColumnAt: function (params) { | ||
@@ -394,2 +406,13 @@ params = validateParameters(params, { | ||
}, | ||
removeColumns: function (params) { | ||
params = validateParameters(params, { | ||
columnIndices: {type: 'array'} | ||
}); | ||
// We need to remove the last index first, otherwise the removal would affect the other indices | ||
var sortedIndices = _.reverse(_.sortBy(params.columnIndices)); | ||
_.forEach(sortedIndices, function (columnIndex) { | ||
renderManager.removeItemAt({columnIndex: columnIndex}); | ||
}); | ||
renderManager.render(scrollManager); // render more items to the right | ||
}, | ||
@@ -401,3 +424,3 @@ moveRow: function (params) { | ||
}); | ||
renderManager.moveRow(_.extend({scrollManager}, params)); | ||
renderManager.moveRow(_.assign({scrollManager}, params)); | ||
}, | ||
@@ -409,4 +432,13 @@ | ||
}); | ||
renderManager.addItemAt(_.extend({scrollManager}, params)); | ||
renderManager.addItemAt(_.assign({scrollManager}, params)); | ||
}, | ||
addRows: function (params) { | ||
params = validateParameters(params, { | ||
rowIndices: {type: 'array'} | ||
}); | ||
var sortedIndices = _.sortBy(params.rowIndices); | ||
_.forEach(sortedIndices, function (rowIndex) { | ||
renderManager.addItemAt(_.assign({scrollManager}, {rowIndex: rowIndex})); | ||
}); | ||
}, | ||
@@ -417,4 +449,13 @@ addColumnAt: function (params) { | ||
}); | ||
renderManager.addItemAt(_.extend({scrollManager}, params)); | ||
renderManager.addItemAt(_.assign({scrollManager}, params)); | ||
}, | ||
addColumns: function (params) { | ||
params = validateParameters(params, { | ||
columnIndices: {type: 'array'} | ||
}); | ||
var sortedIndices = _.sortBy(params.columnIndices); | ||
_.forEach(sortedIndices, function (columnIndex) { | ||
renderManager.addItemAt(_.assign({scrollManager}, {columnIndex: columnIndex})); | ||
}); | ||
}, | ||
@@ -573,2 +614,6 @@ rowWasMovedInDom: renderManager.rowWasMovedInDom, | ||
getRowCount: function () { | ||
return config.rowCount; | ||
}, | ||
}; | ||
@@ -575,0 +620,0 @@ |
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
536982
7599