Merge pull request #12076 from Budibase/fix/12070-user-column-dnd-freeze

User column drag and drop freeze fix
This commit is contained in:
Michael Drury 2023-10-18 13:36:11 +01:00 committed by GitHub
commit c033c85f46
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 26 additions and 24 deletions

View File

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