1
0
Fork 0
mirror of synced 2024-07-02 21:10:43 +12:00

Prevent editing linked record columns

This commit is contained in:
Andrew Kingston 2020-10-01 11:33:26 +01:00
parent 71cc7a9059
commit 708d127fef

View file

@ -15,6 +15,7 @@
$: sortColumn = $backendUiStore.sort && $backendUiStore.sort.column $: sortColumn = $backendUiStore.sort && $backendUiStore.sort.column
$: sortDirection = $backendUiStore.sort && $backendUiStore.sort.direction $: sortDirection = $backendUiStore.sort && $backendUiStore.sort.direction
$: type = field?.type
function showEditor() { function showEditor() {
editing = true editing = true
@ -54,10 +55,12 @@
<CreateEditColumnModal onClosed={hideEditor} {field} /> <CreateEditColumnModal onClosed={hideEditor} {field} />
{:else} {:else}
<ul> <ul>
<li data-cy="edit-column-header" on:click={showEditor}> {#if type !== 'link'}
<Icon name="edit" /> <li data-cy="edit-column-header" on:click={showEditor}>
Edit <Icon name="edit" />
</li> Edit
</li>
{/if}
<li <li
data-cy="delete-column-header" data-cy="delete-column-header"
on:click={() => confirmDeleteDialog.show()}> on:click={() => confirmDeleteDialog.show()}>