Skip to content

Commit

Permalink
fix: cell disappear on edit in one column tables
Browse files Browse the repository at this point in the history
  • Loading branch information
Fabio286 committed Dec 8, 2021
1 parent 35cb7e1 commit aaa5549
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
6 changes: 4 additions & 2 deletions src/renderer/components/WorkspaceTabQueryTable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
v-if="resultsWithRows[resultsetIndex] && resultsWithRows[resultsetIndex].rows"
ref="resultTable"
:items="sortedResults"
:item-height="23"
:item-height="rowHeight"
class="tbody"
:visible-height="resultsSize"
:scroll-element="scrollElement"
Expand All @@ -71,6 +71,7 @@
<WorkspaceTabQueryTableRow
v-for="row in items"
:key="row._antares_id"
:item-height="rowHeight"
:row="row"
:fields="fieldsObj"
:key-usage="keyUsage"
Expand Down Expand Up @@ -142,7 +143,8 @@ export default {
currentSort: '',
currentSortDir: 'asc',
resultsetIndex: 0,
scrollElement: null
scrollElement: null,
rowHeight: 23
};
},
computed: {
Expand Down
7 changes: 6 additions & 1 deletion src/renderer/components/WorkspaceTabQueryTableRow.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
<template>
<div class="tr" @click="selectRow($event, row._antares_id)">
<div
class="tr"
:style="{height: itemHeight+'px'}"
@click="selectRow($event, row._antares_id)"
>
<div
v-for="(col, cKey) in row"
v-show="cKey !== '_antares_id'"
Expand Down Expand Up @@ -261,6 +265,7 @@ export default {
row: Object,
fields: Object,
keyUsage: Array,
itemHeight: Number,
elementType: { type: String, default: 'table' }
},
data () {
Expand Down

0 comments on commit aaa5549

Please sign in to comment.