From e6b681ea07c19dd8e3e101e2d4d0068f7ae28abc Mon Sep 17 00:00:00 2001 From: Troy Morehouse Date: Fri, 22 Mar 2019 10:35:12 -0300 Subject: [PATCH 1/2] fix(table): fix SSR mismatch errors --- src/components/table/helpers/mixin-thead.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/table/helpers/mixin-thead.js b/src/components/table/helpers/mixin-thead.js index b342252d77d..18b7a76af05 100644 --- a/src/components/table/helpers/mixin-thead.js +++ b/src/components/table/helpers/mixin-thead.js @@ -105,10 +105,10 @@ export default { : this.normalizeSlot(`HEAD_${field.key}`, fieldScope) if (slot) { slot = [slot] - } else { - data.domProps = htmlOrText(field.labelHtml, field.label) + } else if (field.labelHtml) { + data.domProps = htmlOrText(field.labelHtml) } - return h('th', data, [slot]) + return h('th', data, slot || field.label) } // Generate the array of TH cells From 4c5a5bb85aa5d95b26b83596bd28b6617889939a Mon Sep 17 00:00:00 2001 From: Troy Morehouse Date: Fri, 22 Mar 2019 10:37:55 -0300 Subject: [PATCH 2/2] Update mixin-thead.js --- src/components/table/helpers/mixin-thead.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/table/helpers/mixin-thead.js b/src/components/table/helpers/mixin-thead.js index 18b7a76af05..748c4e86d7e 100644 --- a/src/components/table/helpers/mixin-thead.js +++ b/src/components/table/helpers/mixin-thead.js @@ -105,7 +105,7 @@ export default { : this.normalizeSlot(`HEAD_${field.key}`, fieldScope) if (slot) { slot = [slot] - } else if (field.labelHtml) { + } else { data.domProps = htmlOrText(field.labelHtml) } return h('th', data, slot || field.label)