console-grid
Advanced tools
Comparing version 1.0.14 to 1.0.15
@@ -34,3 +34,3 @@ const Style = require("./style.js"); | ||
defaultMinWidth: 1, | ||
defaultMaxWidth: 30, | ||
defaultMaxWidth: 50, | ||
@@ -168,3 +168,3 @@ sortField: "", | ||
var name = column.name + ""; | ||
var name = (column.name || column.id) + ""; | ||
name = name.replace(/\s/g, " "); | ||
@@ -290,2 +290,14 @@ column.name = name; | ||
var prevItem; | ||
list.forEach(function (item, i) { | ||
if (!prevItem) { | ||
prevItem = item; | ||
} | ||
if (item.innerBorder) { | ||
item.innerProxy = prevItem; | ||
} | ||
prevItem = item; | ||
}); | ||
list.sort((a, b) => { | ||
@@ -297,2 +309,8 @@ var option = { | ||
}; | ||
if (a.innerBorder) { | ||
a = a.innerProxy; | ||
} | ||
if (b.innerBorder) { | ||
b = b.innerProxy; | ||
} | ||
return comparer.call(this, a, b, option); | ||
@@ -613,2 +631,6 @@ }); | ||
this.gridRows.forEach(row => { | ||
if (row.innerBorder) { | ||
this.renderRowBorder("mid"); | ||
return; | ||
} | ||
this.renderRow(row); | ||
@@ -615,0 +637,0 @@ }); |
{ | ||
"name": "console-grid", | ||
"version": "1.0.14", | ||
"version": "1.0.15", | ||
"description": "console log a grid", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
@@ -117,3 +117,3 @@ # console-grid | ||
defaultMinWidth: 1, | ||
defaultMaxWidth: 30, | ||
defaultMaxWidth: 50, | ||
@@ -174,4 +174,9 @@ sortField: "", | ||
### v1.0.15 | ||
* fixed invalid header name with column id | ||
* added row.innerBorder | ||
--- | ||
### v1.0.14 | ||
* support fullWidth Unicode | ||
--- |
30589
730
180