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