readonly connection fixes

This commit is contained in:
Jan Prochazka 2024-08-27 11:20:43 +02:00
parent b9737533bd
commit db6d5f498b
3 changed files with 4 additions and 2 deletions

View File

@ -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)} />

View File

@ -95,6 +95,7 @@
grider.editable}
onDictionaryLookup={() => handleLookup(col)}
onSetValue={value => grider.setCellValue(rowIndex, col.uniqueName, value)}
isReadonly={!grider.editable}
/>
{/if}
{/each}

View File

@ -158,7 +158,7 @@
formViewComponent={SqlFormView}
{display}
showReferences
showMacros
showMacros={!$connection?.isReadOnly}
hasMultiColumnFilter
onRunMacro={handleRunMacro}
macroCondition={macro => macro.type == 'transformValue'}