Skip to content

Commit 3d273ef

Browse files
committed
fix styles on boolean cell with false as value.
1 parent 775378a commit 3d273ef

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

dist/aha-table.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@
272272
on-change="{{ save }}"
273273
checked?="{{ row[column.name] }}" />
274274
</div>
275-
<div class="{{ column.editable && row._editing ? 'hide' : ''}} {{ row[column.name] ? '' : 'empty'}}">{{
275+
<div class="{{ column.editable && row._editing ? 'hide' : ''}} {{ row[column.name] === null || row[column.name] === undefined ? 'empty' : ''}}">{{
276276
row[column.name] | _translate(column.options, column.placeholder)
277277
}}</div>
278278
</td>
@@ -444,7 +444,7 @@
444444
modifiedChanged: function() {},
445445
//translate value to labels for select
446446
_translate: function(value, options, blank){
447-
if (value != "" && options) {
447+
if (value !== "" && options) {
448448
for (var i = options.length - 1; i >= 0; i--) {
449449
if (options[i].value == value) {
450450
return options[i].label;
@@ -792,4 +792,4 @@
792792
}
793793
});
794794
</script>
795-
</polymer-element>
795+
</polymer-element>

index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,8 +140,8 @@ <h2><a href="demo/performance.html">Performance Test</a></h2>
140140
{ title: "gym", date: new Date().toISOString().slice(0, 10), type: "private", content: "5*20 situps, 5 miles running, 5 minutes planks", enabled: true },
141141
{ title: "breakfast", date: new Date().toISOString().slice(0, 10), type: "private", enabled: true },
142142
{ title: "work", date: new Date().toISOString().slice(0, 10), type: "public", content: "implement aha-table plymer element", enabled: true },
143-
{ title: "lunch", date: new Date().toISOString().slice(0, 10), type: "public", content: null },
144-
{ title: "work", date: new Date().toISOString().slice(0, 10), type: "public", content: "implement aha-table plymer element", enabled: true },
143+
{ title: "lunch", date: new Date().toISOString().slice(0, 10), type: "public", content: null, enabled: false },
144+
{ title: "work", date: new Date().toISOString().slice(0, 10), type: "public", content: "implement aha-table plymer element" },
145145
{ title: "lunch", date: new Date().toISOString().slice(0, 10), type: "public", content: null },
146146
{ title: "work", date: new Date().toISOString().slice(0, 10), type: "public", content: "implement aha-table plymer element", enabled: true },
147147
{ title: "", date: new Date().toISOString().slice(0, 10), type: "public", content: null },

src/aha-table.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@
272272
on-change="{{ save }}"
273273
checked?="{{ row[column.name] }}" />
274274
</div>
275-
<div class="{{ column.editable && row._editing ? 'hide' : ''}} {{ row[column.name] ? '' : 'empty'}}">{{
275+
<div class="{{ column.editable && row._editing ? 'hide' : ''}} {{ row[column.name] === null || row[column.name] === undefined ? 'empty' : ''}}">{{
276276
row[column.name] | _translate(column.options, column.placeholder)
277277
}}</div>
278278
</td>

0 commit comments

Comments
 (0)