kopia lustrzana https://github.com/c9/core
fix error when updating datagrid columns
rodzic
3eb81a1c29
commit
13c6c0cd77
|
@ -58,7 +58,7 @@ function ColumnHeader(parentEl, renderer) {
|
||||||
if (col.value && !col.getText)
|
if (col.value && !col.getText)
|
||||||
col.getText = getColumnText;
|
col.getText = getColumnText;
|
||||||
var w = col.width;
|
var w = col.width;
|
||||||
if (w.slice(-1) == "%") {
|
if (typeof w == "string" && w.slice(-1) == "%") {
|
||||||
col.flex = parseInt(w, 10) / 100;
|
col.flex = parseInt(w, 10) / 100;
|
||||||
col.$width = col.width;
|
col.$width = col.width;
|
||||||
} else {
|
} else {
|
||||||
|
@ -69,6 +69,7 @@ function ColumnHeader(parentEl, renderer) {
|
||||||
col.pixelWidth = 0;
|
col.pixelWidth = 0;
|
||||||
}, this);
|
}, this);
|
||||||
columns.$fixedWidth = fixedWidth + "px";
|
columns.$fixedWidth = fixedWidth + "px";
|
||||||
|
columns.width = null;
|
||||||
provider.columns = columns;
|
provider.columns = columns;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -14,8 +14,8 @@ oop.inherits(ListData, DataProvider);
|
||||||
(function() {
|
(function() {
|
||||||
|
|
||||||
this.setRoot = function(array) {
|
this.setRoot = function(array) {
|
||||||
this.visibleItems = array
|
this.visibleItems = array || [];
|
||||||
this._signal("change");
|
this._signal("change");
|
||||||
};
|
};
|
||||||
|
|
||||||
this.getDataRange = function(rows, columns, callback) {
|
this.getDataRange = function(rows, columns, callback) {
|
||||||
|
|
Ładowanie…
Reference in New Issue