form view cell width fix

This commit is contained in:
Jan Prochazka
2021-11-18 18:30:13 +01:00
parent 780c1321e6
commit fb01b4b3f7
2 changed files with 47 additions and 47 deletions

View File

@@ -58,7 +58,7 @@
export let isAutofillSelected = false; export let isAutofillSelected = false;
export let isFocusedColumn = false; export let isFocusedColumn = false;
export let domCell = undefined; export let domCell = undefined;
export let hideContent = false; export let showSlot = false;
export let onSetFormView; export let onSetFormView;
export let isDynamicStructure = false; export let isDynamicStructure = false;
export let isAutoFillMarker = false; export let isAutoFillMarker = false;
@@ -96,9 +96,6 @@
class:isFocusedColumn class:isFocusedColumn
{style} {style}
> >
{#if hideContent}
<slot />
{:else}
{#if value === null} {#if value === null}
<span class="null">(NULL)</span> <span class="null">(NULL)</span>
{:else if value === undefined} {:else if value === undefined}
@@ -146,11 +143,14 @@
{#if col.foreignKey && isCurrentCell && onDictionaryLookup} {#if col.foreignKey && isCurrentCell && onDictionaryLookup}
<ShowFormButton icon="icon dots-horizontal" on:click={onDictionaryLookup} /> <ShowFormButton icon="icon dots-horizontal" on:click={onDictionaryLookup} />
{/if} {/if}
{/if}
{#if isAutoFillMarker} {#if isAutoFillMarker}
<div class="autoFillMarker autofillHandleMarker" /> <div class="autoFillMarker autofillHandleMarker" />
{/if} {/if}
{#if showSlot}
<slot />
{/if}
</td> </td>
<!-- {#if _.isArray(value.data)} <!-- {#if _.isArray(value.data)}

View File

@@ -537,7 +537,7 @@
allowHintField={!(rowStatus.modifiedFields && rowStatus.modifiedFields.has(col.uniqueName))} allowHintField={!(rowStatus.modifiedFields && rowStatus.modifiedFields.has(col.uniqueName))}
bind:domCell={domCells[`${rowIndex},${chunkIndex * 2 + 1}`]} bind:domCell={domCells[`${rowIndex},${chunkIndex * 2 + 1}`]}
onSetFormView={handleSetFormView} onSetFormView={handleSetFormView}
hideContent={!rowData || showSlot={!rowData ||
($inplaceEditorState.cell && ($inplaceEditorState.cell &&
rowIndex == $inplaceEditorState.cell[0] && rowIndex == $inplaceEditorState.cell[0] &&
chunkIndex * 2 + 1 == $inplaceEditorState.cell[1])} chunkIndex * 2 + 1 == $inplaceEditorState.cell[1])}