mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-26 20:16:00 +00:00
readonly connection fixes
This commit is contained in:
@@ -32,6 +32,7 @@
|
|||||||
export let onDictionaryLookup = null;
|
export let onDictionaryLookup = null;
|
||||||
export let onSetValue;
|
export let onSetValue;
|
||||||
export let editorTypes = null;
|
export let editorTypes = null;
|
||||||
|
export let isReadonly;
|
||||||
|
|
||||||
$: value = col.isStructured ? _.get(rowData || {}, col.uniquePath) : (rowData || {})[col.uniqueName];
|
$: value = col.isStructured ? _.get(rowData || {}, col.uniquePath) : (rowData || {})[col.uniqueName];
|
||||||
|
|
||||||
@@ -102,7 +103,7 @@
|
|||||||
{/if}
|
{/if}
|
||||||
{:else if col.foreignKey && rowData && rowData[col.uniqueName] && !isCurrentCell}
|
{:else if col.foreignKey && rowData && rowData[col.uniqueName] && !isCurrentCell}
|
||||||
<ShowFormButton on:click={() => onSetFormView(rowData, col)} />
|
<ShowFormButton on:click={() => onSetFormView(rowData, col)} />
|
||||||
{:else if col.foreignKey && isCurrentCell && onDictionaryLookup}
|
{:else if col.foreignKey && isCurrentCell && onDictionaryLookup && !isReadonly}
|
||||||
<ShowFormButton icon="icon dots-horizontal" on:click={onDictionaryLookup} />
|
<ShowFormButton icon="icon dots-horizontal" on:click={onDictionaryLookup} />
|
||||||
{:else if isJson}
|
{:else if isJson}
|
||||||
<ShowFormButton icon="icon open-in-new" on:click={() => openJsonDocument(value, undefined, true)} />
|
<ShowFormButton icon="icon open-in-new" on:click={() => openJsonDocument(value, undefined, true)} />
|
||||||
|
|||||||
@@ -95,6 +95,7 @@
|
|||||||
grider.editable}
|
grider.editable}
|
||||||
onDictionaryLookup={() => handleLookup(col)}
|
onDictionaryLookup={() => handleLookup(col)}
|
||||||
onSetValue={value => grider.setCellValue(rowIndex, col.uniqueName, value)}
|
onSetValue={value => grider.setCellValue(rowIndex, col.uniqueName, value)}
|
||||||
|
isReadonly={!grider.editable}
|
||||||
/>
|
/>
|
||||||
{/if}
|
{/if}
|
||||||
{/each}
|
{/each}
|
||||||
|
|||||||
@@ -158,7 +158,7 @@
|
|||||||
formViewComponent={SqlFormView}
|
formViewComponent={SqlFormView}
|
||||||
{display}
|
{display}
|
||||||
showReferences
|
showReferences
|
||||||
showMacros
|
showMacros={!$connection?.isReadOnly}
|
||||||
hasMultiColumnFilter
|
hasMultiColumnFilter
|
||||||
onRunMacro={handleRunMacro}
|
onRunMacro={handleRunMacro}
|
||||||
macroCondition={macro => macro.type == 'transformValue'}
|
macroCondition={macro => macro.type == 'transformValue'}
|
||||||
|
|||||||
Reference in New Issue
Block a user