Skip to content

Commit

Permalink
Merge pull request #3 from custom-cards/no-title
Browse files Browse the repository at this point in the history
Remove header when title not populated
  • Loading branch information
iantrich committed Oct 10, 2018
2 parents 17ecbd9 + d559e83 commit 194f758
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.0.6
0.0.7
5 changes: 1 addition & 4 deletions list-card.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,7 @@ class ListCard extends HTMLElement {
if (root.lastChild) root.removeChild(root.lastChild);

const cardConfig = Object.assign({}, config);
if (!cardConfig.title) cardConfig.title = 'List';

const columns = cardConfig.columns;

const card = document.createElement('ha-card');
const content = document.createElement('div');
const style = document.createElement('style');
Expand Down Expand Up @@ -76,7 +73,7 @@ class ListCard extends HTMLElement {
}

content.id = "container";
card.header = cardConfig.title;
cardConfig.title ? card.header = cardConfig.title : null;
card.appendChild(content);
card.appendChild(style);
root.appendChild(card);
Expand Down

0 comments on commit 194f758

Please sign in to comment.