Skip to content

Commit

Permalink
Simple Tables will not show table header if absent
Browse files Browse the repository at this point in the history
  • Loading branch information
jolzee committed Mar 6, 2020
1 parent 7e802d3 commit 77e8a0d
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion src/components/ChatTeneoResponse.vue
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@
:height="extension.maxHeight ? extension.maxHeight : undefined"
>
<template v-slot:default>
<thead>
<thead v-if="hasHeaders(extension)">
<tr>
<th
v-for="header in extension.headers"
Expand Down Expand Up @@ -773,6 +773,17 @@ export default {
}
},
methods: {
hasHeaders(extension) {
let hasHeaders = false;
if (extension.headers) {
extension.headers.forEach(header => {
if (header.trim() !== "") {
hasHeaders = true;
}
});
}
return hasHeaders;
},
addAccessibilityPrefix(text) {
const prefix508 = `<span class="sr-only">Chat bot said.</span>`;
if (!isHtml(text)) {
Expand Down

0 comments on commit 77e8a0d

Please sign in to comment.