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) {
|
||||
self.options.columns.splice(index, 0, '');
|
||||
self.values = self.values.map(function(columns) {
|
||||
return columns.splice(index, 0, 0);
|
||||
Ox.print('sv', JSON.stringify(self.values))
|
||||
self.values.forEach(function(columns) {
|
||||
columns.splice(index, 0, 0);
|
||||
});
|
||||
Ox.print('sv', JSON.stringify(self.values))
|
||||
renderSpreadsheet();
|
||||
}
|
||||
|
||||
|
@ -63,8 +65,8 @@ Ox.Spreadsheet = function(options, self) {
|
|||
|
||||
function removeColumn(index) {
|
||||
self.options.columns.splice(index, 1);
|
||||
self.values = self.values.map(function(columns) {
|
||||
return columns.splice(index, 1);
|
||||
self.values.forEach(function(columns) {
|
||||
columns.splice(index, 1);
|
||||
});
|
||||
renderSpreadsheet();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue