fix bugs in Spreadsheet
This commit is contained in:
parent
137944a1a7
commit
2861954d35
1 changed files with 6 additions and 4 deletions
|
@ -32,9 +32,11 @@ Ox.Spreadsheet = function(options, self) {
|
||||||
|
|
||||||
function addColumn(index) {
|
function addColumn(index) {
|
||||||
self.options.columns.splice(index, 0, '');
|
self.options.columns.splice(index, 0, '');
|
||||||
self.values = self.values.map(function(columns) {
|
Ox.print('sv', JSON.stringify(self.values))
|
||||||
return columns.splice(index, 0, 0);
|
self.values.forEach(function(columns) {
|
||||||
|
columns.splice(index, 0, 0);
|
||||||
});
|
});
|
||||||
|
Ox.print('sv', JSON.stringify(self.values))
|
||||||
renderSpreadsheet();
|
renderSpreadsheet();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -63,8 +65,8 @@ Ox.Spreadsheet = function(options, self) {
|
||||||
|
|
||||||
function removeColumn(index) {
|
function removeColumn(index) {
|
||||||
self.options.columns.splice(index, 1);
|
self.options.columns.splice(index, 1);
|
||||||
self.values = self.values.map(function(columns) {
|
self.values.forEach(function(columns) {
|
||||||
return columns.splice(index, 1);
|
columns.splice(index, 1);
|
||||||
});
|
});
|
||||||
renderSpreadsheet();
|
renderSpreadsheet();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue