Skip to content

Commit 9b352e8

Browse files
committed
Fix - VueUiSparklineTable - Fix regression in reponsive mode
1 parent 7037d87 commit 9b352e8

File tree

1 file changed

+27
-20
lines changed

1 file changed

+27
-20
lines changed

src/components/vue-ui-table-sparkline.vue

Lines changed: 27 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -458,28 +458,34 @@ defineExpose({
458458
</script>
459459
460460
<template>
461-
<div ref="tableContainer" :class="{ 'vue-ui-responsive': isResponsive }" style="overflow: hidden" :id="`table_${uid}`" @mouseenter="() => setUserOptionsVisibility(true)" @mouseleave="() => setUserOptionsVisibility(false)">
461+
<div ref="tableContainer" :class="{ 'vue-ui-responsive': isResponsive }" style="overflow: hidden" :id="`table_${uid}`" @mouseenter="() => setUserOptionsVisibility(true)" @mouseleave="() => setUserOptionsVisibility(false)">
462+
463+
<div
464+
v-if="FINAL_CONFIG.title.text"
465+
class="vue-ui-table-sparkline-caption"
466+
:style="{ backgroundColor: FINAL_CONFIG.title.backgroundColor }"
467+
>
468+
<div :style="{
469+
fontSize: `${FINAL_CONFIG.title.fontSize}px`,
470+
fontWeight: FINAL_CONFIG.title.bold ? 'bold' : 'normal',
471+
color: FINAL_CONFIG.title.color,
472+
textAlign: FINAL_CONFIG.title.textAlign,
473+
}">
474+
{{ FINAL_CONFIG.title.text }}
475+
</div>
476+
<div v-if="FINAL_CONFIG.title.subtitle.text" :style="{
477+
fontSize: `${FINAL_CONFIG.title.subtitle.fontSize}px`,
478+
fontWeight: FINAL_CONFIG.title.subtitle.bold ? 'bold' : 'normal',
479+
color: FINAL_CONFIG.title.subtitle.color,
480+
textAlign: FINAL_CONFIG.title.textAlign,
481+
}">
482+
{{ FINAL_CONFIG.title.subtitle.text }}
483+
</div>
484+
</div>
462485
<div style="overflow: auto" @pointerleave="selectedSerieIndex = undefined; selectedDataIndex = undefined">
463486
<table data-cy="vue-data-ui-table-sparkline" class="vue-ui-data-table"
464487
:style="{ fontFamily: FINAL_CONFIG.fontFamily, position: 'relative' }">
465-
<caption v-if="FINAL_CONFIG.title.text" :style="{ backgroundColor: FINAL_CONFIG.title.backgroundColor }">
466-
<div :style="{
467-
fontSize: `${FINAL_CONFIG.title.fontSize}px`,
468-
fontWeight: FINAL_CONFIG.title.bold ? 'bold' : 'normal',
469-
color: FINAL_CONFIG.title.color,
470-
textAlign: FINAL_CONFIG.title.textAlign,
471-
}">
472-
{{ FINAL_CONFIG.title.text }}
473-
</div>
474-
<div v-if="FINAL_CONFIG.title.subtitle.text" :style="{
475-
fontSize: `${FINAL_CONFIG.title.subtitle.fontSize}px`,
476-
fontWeight: FINAL_CONFIG.title.subtitle.bold ? 'bold' : 'normal',
477-
color: FINAL_CONFIG.title.subtitle.color,
478-
textAlign: FINAL_CONFIG.title.textAlign,
479-
}">
480-
{{ FINAL_CONFIG.title.subtitle.text }}
481-
</div>
482-
</caption>
488+
483489
484490
<thead style="z-index: 1;padding-right:24px">
485491
<tr
@@ -675,7 +681,7 @@ defineExpose({
675681
j === selectedDataIndex
676682
? FINAL_CONFIG.tbody.selectedColor.useSerieColor ? `${tr.color.length > 7 ? tr.color.slice(0,-2) : tr.color }33` : FINAL_CONFIG.tbody.selectedColor.fallback
677683
: '',
678-
}" :data-cell="colNames[j]" class="vue-ui-data-table__tbody__td" @pointerenter="selectedSerieIndex = i; selectedDataIndex = j">
684+
}" :data-cell="colNames[j] ? colNames[j].value : ''" class="vue-ui-data-table__tbody__td" @pointerenter="selectedSerieIndex = i; selectedDataIndex = j">
679685
{{ [null, undefined].includes(tr.values[j]) ? '-' : applyDataLabel(
680686
FINAL_CONFIG.formatter,
681687
Number(tr.values[j]),
@@ -840,6 +846,7 @@ td {
840846
width: 100px;
841847
min-width: 100px;
842848
left: 0;
849+
z-index: 1;
843850
}
844851
845852
.vue-ui-responsive {

0 commit comments

Comments
 (0)