Ox.Spreadsheet: allow for not passing options.value.values
This commit is contained in:
parent
3a71cab021
commit
91ee1419aa
1 changed files with 10 additions and 6 deletions
|
@ -36,7 +36,10 @@ Ox.Spreadsheet = function(options, self) {
|
||||||
self.options.value.rows.push('');
|
self.options.value.rows.push('');
|
||||||
self.options.value.values.push([0, 0, 0, 0]);
|
self.options.value.values.push([0, 0, 0, 0]);
|
||||||
});
|
});
|
||||||
} else if (Ox.isEmpty(self.options.value.values)) {
|
} else {
|
||||||
|
self.options.value.values = self.options.value.values || [];
|
||||||
|
if (Ox.isEmpty(self.options.value.values)) {
|
||||||
|
self.options.value.values = [];
|
||||||
self.options.value.rows.forEach(function(row, r) {
|
self.options.value.rows.forEach(function(row, r) {
|
||||||
self.options.value.values.push([]);
|
self.options.value.values.push([]);
|
||||||
self.options.value.columns.forEach(function(column, c) {
|
self.options.value.columns.forEach(function(column, c) {
|
||||||
|
@ -44,6 +47,7 @@ Ox.Spreadsheet = function(options, self) {
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
renderSpreadsheet();
|
renderSpreadsheet();
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue