mirror of
https://github.com/lana-k/sqliteviz.git
synced 2025-12-06 18:18:53 +08:00
#115 update value when switch row
This commit is contained in:
@@ -78,6 +78,15 @@ export default {
|
||||
this.selectCell(cell)
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
currentRowIndex () {
|
||||
if (this.selectedCellElement) {
|
||||
const previouslySelected = this.selectedCellElement
|
||||
this.selectCell(null)
|
||||
this.selectCell(previouslySelected)
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
onTableKeydown (e) {
|
||||
const keyCodeMap = {
|
||||
|
||||
@@ -13,7 +13,10 @@
|
||||
<div :id="'run-result-result-set-'+tab.id" class="result-set-container"/>
|
||||
<template #right-pane v-if="viewValuePanelVisible">
|
||||
<div class="value-viewer-container">
|
||||
<value-viewer v-show="selectedCell" :cellValue="selectedCellValue"/>
|
||||
<value-viewer
|
||||
v-show="selectedCell"
|
||||
:cellValue="selectedCell ? selectedCell.innerText : ''"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
</component>
|
||||
@@ -41,6 +44,7 @@
|
||||
:disabled="!result"
|
||||
tooltip="View record"
|
||||
tooltip-position="top-left"
|
||||
:active="viewRecord"
|
||||
@click="toggleViewRecord"
|
||||
>
|
||||
<export-to-csv-icon/>
|
||||
@@ -50,6 +54,7 @@
|
||||
:disabled="!result"
|
||||
tooltip="View value"
|
||||
tooltip-position="top-left"
|
||||
:active="viewValuePanelVisible"
|
||||
@click="toggleViewValuePanel"
|
||||
>
|
||||
<clipboard-icon/>
|
||||
@@ -147,7 +152,6 @@ export default {
|
||||
dataToCopy: null,
|
||||
viewValuePanelVisible: false,
|
||||
selectedCell: null,
|
||||
selectedCellValue: '',
|
||||
viewRecord: false,
|
||||
defaultPage: 1,
|
||||
defaultSelectedCell: null
|
||||
@@ -189,7 +193,6 @@ export default {
|
||||
result () {
|
||||
this.defaultSelectedCell = null
|
||||
this.selectedCell = null
|
||||
this.selectedCellValue = ''
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
@@ -278,7 +281,6 @@ export default {
|
||||
|
||||
onUpdateSelectedCell (e) {
|
||||
this.selectedCell = e
|
||||
this.selectedCellValue = this.selectedCell?.innerText
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user