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)
|
this.selectCell(cell)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
watch: {
|
||||||
|
currentRowIndex () {
|
||||||
|
if (this.selectedCellElement) {
|
||||||
|
const previouslySelected = this.selectedCellElement
|
||||||
|
this.selectCell(null)
|
||||||
|
this.selectCell(previouslySelected)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
onTableKeydown (e) {
|
onTableKeydown (e) {
|
||||||
const keyCodeMap = {
|
const keyCodeMap = {
|
||||||
|
|||||||
@@ -13,7 +13,10 @@
|
|||||||
<div :id="'run-result-result-set-'+tab.id" class="result-set-container"/>
|
<div :id="'run-result-result-set-'+tab.id" class="result-set-container"/>
|
||||||
<template #right-pane v-if="viewValuePanelVisible">
|
<template #right-pane v-if="viewValuePanelVisible">
|
||||||
<div class="value-viewer-container">
|
<div class="value-viewer-container">
|
||||||
<value-viewer v-show="selectedCell" :cellValue="selectedCellValue"/>
|
<value-viewer
|
||||||
|
v-show="selectedCell"
|
||||||
|
:cellValue="selectedCell ? selectedCell.innerText : ''"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</component>
|
</component>
|
||||||
@@ -41,6 +44,7 @@
|
|||||||
:disabled="!result"
|
:disabled="!result"
|
||||||
tooltip="View record"
|
tooltip="View record"
|
||||||
tooltip-position="top-left"
|
tooltip-position="top-left"
|
||||||
|
:active="viewRecord"
|
||||||
@click="toggleViewRecord"
|
@click="toggleViewRecord"
|
||||||
>
|
>
|
||||||
<export-to-csv-icon/>
|
<export-to-csv-icon/>
|
||||||
@@ -50,6 +54,7 @@
|
|||||||
:disabled="!result"
|
:disabled="!result"
|
||||||
tooltip="View value"
|
tooltip="View value"
|
||||||
tooltip-position="top-left"
|
tooltip-position="top-left"
|
||||||
|
:active="viewValuePanelVisible"
|
||||||
@click="toggleViewValuePanel"
|
@click="toggleViewValuePanel"
|
||||||
>
|
>
|
||||||
<clipboard-icon/>
|
<clipboard-icon/>
|
||||||
@@ -147,7 +152,6 @@ export default {
|
|||||||
dataToCopy: null,
|
dataToCopy: null,
|
||||||
viewValuePanelVisible: false,
|
viewValuePanelVisible: false,
|
||||||
selectedCell: null,
|
selectedCell: null,
|
||||||
selectedCellValue: '',
|
|
||||||
viewRecord: false,
|
viewRecord: false,
|
||||||
defaultPage: 1,
|
defaultPage: 1,
|
||||||
defaultSelectedCell: null
|
defaultSelectedCell: null
|
||||||
@@ -189,7 +193,6 @@ export default {
|
|||||||
result () {
|
result () {
|
||||||
this.defaultSelectedCell = null
|
this.defaultSelectedCell = null
|
||||||
this.selectedCell = null
|
this.selectedCell = null
|
||||||
this.selectedCellValue = ''
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
@@ -278,7 +281,6 @@ export default {
|
|||||||
|
|
||||||
onUpdateSelectedCell (e) {
|
onUpdateSelectedCell (e) {
|
||||||
this.selectedCell = e
|
this.selectedCell = e
|
||||||
this.selectedCellValue = this.selectedCell?.innerText
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user