mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-05-01 02:43:59 +00:00
formview fixes
This commit is contained in:
@@ -96,7 +96,9 @@
|
|||||||
class:isFocusedColumn
|
class:isFocusedColumn
|
||||||
{style}
|
{style}
|
||||||
>
|
>
|
||||||
{#if value === null}
|
{#if rowData == null}
|
||||||
|
<span class="null">(No row)</span>
|
||||||
|
{:else if value === null}
|
||||||
<span class="null">(NULL)</span>
|
<span class="null">(NULL)</span>
|
||||||
{:else if value === undefined}
|
{:else if value === undefined}
|
||||||
<span class="null">(No field)</span>
|
<span class="null">(No field)</span>
|
||||||
|
|||||||
@@ -28,6 +28,7 @@
|
|||||||
export let onSetValue;
|
export let onSetValue;
|
||||||
export let width;
|
export let width;
|
||||||
export let cellValue;
|
export let cellValue;
|
||||||
|
export let fillParent=false;
|
||||||
|
|
||||||
let domEditor;
|
let domEditor;
|
||||||
|
|
||||||
@@ -89,6 +90,7 @@
|
|||||||
on:blur={handleBlur}
|
on:blur={handleBlur}
|
||||||
bind:this={domEditor}
|
bind:this={domEditor}
|
||||||
style={widthCopy ? `width:${widthCopy}px;min-width:${widthCopy}px;max-width:${widthCopy}px` : undefined}
|
style={widthCopy ? `width:${widthCopy}px;min-width:${widthCopy}px;max-width:${widthCopy}px` : undefined}
|
||||||
|
class:fillParent
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
@@ -98,4 +100,12 @@
|
|||||||
margin: 0px;
|
margin: 0px;
|
||||||
padding: 0px;
|
padding: 0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
input.fillParent {
|
||||||
|
position: absolute;
|
||||||
|
left: 0;
|
||||||
|
top: 0;
|
||||||
|
right: 0;
|
||||||
|
bottom: 0;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -398,9 +398,11 @@
|
|||||||
} else {
|
} else {
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
|
if (rowData) {
|
||||||
dispatchInsplaceEditor({ type: 'show', text: event.key, cell: currentCell });
|
dispatchInsplaceEditor({ type: 'show', text: event.key, cell: currentCell });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (event.keyCode == keycodes.escape) {
|
if (event.keyCode == keycodes.escape) {
|
||||||
setConfig(x => ({
|
setConfig(x => ({
|
||||||
@@ -425,8 +427,10 @@
|
|||||||
|
|
||||||
if (event.keyCode == keycodes.f2) {
|
if (event.keyCode == keycodes.f2) {
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
|
if (rowData) {
|
||||||
dispatchInsplaceEditor({ type: 'show', cell: currentCell, selectAll: true });
|
dispatchInsplaceEditor({ type: 'show', cell: currentCell, selectAll: true });
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
handleCursorMove(event);
|
handleCursorMove(event);
|
||||||
}
|
}
|
||||||
@@ -544,8 +548,9 @@
|
|||||||
isCurrentCell={currentCell[0] == rowIndex && currentCell[1] == chunkIndex * 2 + 1}
|
isCurrentCell={currentCell[0] == rowIndex && currentCell[1] == chunkIndex * 2 + 1}
|
||||||
onDictionaryLookup={() => handleLookup(col)}
|
onDictionaryLookup={() => handleLookup(col)}
|
||||||
>
|
>
|
||||||
{#if $inplaceEditorState.cell && rowIndex == $inplaceEditorState.cell[0] && chunkIndex * 2 + 1 == $inplaceEditorState.cell[1]}
|
{#if rowData && $inplaceEditorState.cell && rowIndex == $inplaceEditorState.cell[0] && chunkIndex * 2 + 1 == $inplaceEditorState.cell[1]}
|
||||||
<InplaceEditor
|
<InplaceEditor
|
||||||
|
fillParent
|
||||||
width={getCellWidth(rowIndex, chunkIndex * 2 + 1)}
|
width={getCellWidth(rowIndex, chunkIndex * 2 + 1)}
|
||||||
inplaceEditorState={$inplaceEditorState}
|
inplaceEditorState={$inplaceEditorState}
|
||||||
{dispatchInsplaceEditor}
|
{dispatchInsplaceEditor}
|
||||||
|
|||||||
Reference in New Issue
Block a user