Revert previous fix for relationship column dragging

This commit is contained in:
Andrew Kingston 2023-10-26 10:11:34 +01:00
parent dcc16cd4a2
commit 230dc169fa
1 changed files with 24 additions and 26 deletions

View File

@ -260,31 +260,29 @@
class:wrap={editable || contentLines > 1} class:wrap={editable || contentLines > 1}
on:wheel={e => (focused ? e.stopPropagation() : null)} on:wheel={e => (focused ? e.stopPropagation() : null)}
> >
{#if Array.isArray(value) && value.length} {#each value || [] as relationship}
{#each value as relationship} {#if relationship[primaryDisplay] || relationship.primaryDisplay}
{#if relationship[primaryDisplay] || relationship.primaryDisplay} <div class="badge">
<div class="badge"> <span
<span on:click={editable
on:click={editable ? () => showRelationship(relationship._id)
? () => showRelationship(relationship._id) : null}
: null} >
> {readable(
{readable( relationship[primaryDisplay] || relationship.primaryDisplay
relationship[primaryDisplay] || relationship.primaryDisplay )}
)} </span>
</span> {#if editable}
{#if editable} <Icon
<Icon name="Close"
name="Close" size="XS"
size="XS" hoverable
hoverable on:click={() => toggleRow(relationship)}
on:click={() => toggleRow(relationship)} />
/> {/if}
{/if} </div>
</div> {/if}
{/if} {/each}
{/each}
{/if}
{#if editable} {#if editable}
<div class="add" on:click={open}> <div class="add" on:click={open}>
<Icon name="Add" size="S" /> <Icon name="Add" size="S" />
@ -320,7 +318,7 @@
<div class="searching"> <div class="searching">
<ProgressCircle size="S" /> <ProgressCircle size="S" />
</div> </div>
{:else if Array.isArray(searchResults) && searchResults.length} {:else if searchResults?.length}
<div class="results"> <div class="results">
{#each searchResults as row, idx} {#each searchResults as row, idx}
<div <div