Refactor DbKeyItemDetail and DbKeyValueDetail for improved layout and editor responsiveness

This commit is contained in:
Stela Augustinova
2025-12-19 12:19:07 +01:00
parent 1deaa4c30d
commit 18307b2e03
2 changed files with 19 additions and 10 deletions

View File

@@ -28,9 +28,9 @@
.props {
flex: 1;
display: flex;
flex-direction: row;
flex-direction: column;
gap: 10px;
padding: 10px;
overflow: hidden;
overflow: auto;
}
</style>

View File

@@ -31,14 +31,16 @@
</div>
<div class="colvalue">
{#if display == 'text'}
<AceEditor
readOnly={!onChangeValue}
{value}
mode={keyType === 'JSON' ? 'json' : undefined}
on:input={e => {
onChangeValue?.(e.detail);
}}
/>
<div class="editor-wrapper">
<AceEditor
readOnly={!onChangeValue}
{value}
mode={keyType === 'JSON' ? 'json' : undefined}
on:input={e => {
onChangeValue?.(e.detail);
}}
/>
</div>
{/if}
{#if display == 'json'}
<div class="outer">
@@ -66,6 +68,13 @@
justify-content: space-between;
}
.editor-wrapper {
flex: 1;
position: relative;
min-height: 60px;
max-height: 1000px;
}
.outer {
flex: 1;
position: relative;