Skip to content

Commit a46ef7c

Browse files
committed
fix: hide log entry second-line message unless expanded
- required to have all entries of same height initially Signed-off-by: Maksim Sukharev <[email protected]> (cherry picked from commit 1435fe8)
1 parent 97c5405 commit a46ef7c

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

src/components/table/LogTableRow.vue

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,7 @@
1414
<div class="row-message__container" :class="{ 'row-message__container--expanded': isExpanded }">
1515
<div class="row-message__text">
1616
<LogException v-if="row.exception" :exception="row.exception" />
17-
<!-- Show log message if either there is no exception or a custom message was added -->
18-
<div v-if="!row.exception || row.message !== row.exception.Message" class="row-message__text_message" :title="row.message">
17+
<div v-if="showLogMessage" class="row-message__text_message" :title="row.message">
1918
{{ row.message }}
2019
</div>
2120
</div>
@@ -117,6 +116,13 @@ const timestamp = computed(() => Date.parse(props.row.time))
117116
*/
118117
const isExpanded = ref(false)
119118
119+
/**
120+
* Show log message if either there is no exception or a custom message was added (at expanded view)
121+
*/
122+
const showLogMessage = computed(() => {
123+
return !props.row.exception || (props.row.message !== props.row.exception.Message && isExpanded.value)
124+
})
125+
120126
/**
121127
* Human readable and localized level name
122128
*/

0 commit comments

Comments
 (0)