Permalink
Browse files

_createColumnInfo: accept empty title

  • Loading branch information...
1 parent 716736d commit 54c18be00dd839d9c3d5c3edc831470a5837afc2 @mbraak committed Nov 1, 2012
Showing with 4 additions and 4 deletions.
  1. +2 −2 simple.datagrid.coffee
  2. +2 −2 simple.datagrid.js
View
4 simple.datagrid.coffee
@@ -165,7 +165,7 @@ class SimpleDataGrid extends SimpleWidget
if 'key' of column
key = column.key
if typeof key == 'string'
- column_info = column_map[column.key]
+ column_info = column_map[key]
else
column_info = @columns[key]
@@ -185,7 +185,7 @@ class SimpleDataGrid extends SimpleWidget
_createColumnInfo: (column) ->
if typeof column == 'object'
- if not column.title
+ if not (column.title or column.key)
return null
else
return {
View
4 simple.datagrid.js
@@ -320,7 +320,7 @@ limitations under the License.
if ('key' in column) {
key = column.key;
if (typeof key === 'string') {
- column_info = column_map[column.key];
+ column_info = column_map[key];
} else {
column_info = _this.columns[key];
}
@@ -346,7 +346,7 @@ limitations under the License.
SimpleDataGrid.prototype._createColumnInfo = function(column) {
if (typeof column === 'object') {
- if (!column.title) {
+ if (!(column.title || column.key)) {
return null;
} else {
return {

0 comments on commit 54c18be

Please sign in to comment.