TSK-1445. Fixed ListItem (#3144)

Signed-off-by: Alexander Platov <sas_lord@mail.ru>
This commit is contained in:
Alexander Platov 2023-05-05 08:13:15 +03:00 committed by GitHub
parent c606a037f1
commit 01f6c38daf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 18 additions and 16 deletions

View File

@ -589,12 +589,12 @@ export function createModel (builder: Builder): void {
{ {
key: '', key: '',
presenter: view.component.DividerPresenter, presenter: view.component.DividerPresenter,
props: { type: 'divider', listProps: { optional: true } } props: { type: 'divider', listProps: { compression: true } }
}, },
{ {
key: '', key: '',
presenter: tracker.component.EstimationEditor, presenter: tracker.component.EstimationEditor,
props: { kind: 'list', size: 'small', listProps: { key: 'estimation', fixed: 'left', optional: true } } props: { kind: 'list', size: 'small', listProps: { key: 'estimation', fixed: 'left', compression: true } }
}, },
{ key: '', presenter: view.component.DividerPresenter, props: { type: 'divider' } }, { key: '', presenter: view.component.DividerPresenter, props: { type: 'divider' } },
{ {

View File

@ -155,6 +155,7 @@
</div> </div>
{/if} {/if}
{:else if (!groupByKey || listProps?.excludeByKey !== groupByKey) && !listProps?.optional} {:else if (!groupByKey || listProps?.excludeByKey !== groupByKey) && !listProps?.optional}
{#if !(compactMode && listProps?.compression)}
{#if listProps?.fixed} {#if listProps?.fixed}
<FixedColumn key={`list_item_${attributeModel.props?.listProps.key}`} justify={listProps.fixed}> <FixedColumn key={`list_item_${attributeModel.props?.listProps.key}`} justify={listProps.fixed}>
<svelte:component <svelte:component
@ -176,6 +177,7 @@
/> />
{/if} {/if}
{/if} {/if}
{/if}
{/each} {/each}
{#if compactMode} {#if compactMode}
<div class="panel-trigger" tabindex="-1"> <div class="panel-trigger" tabindex="-1">
@ -191,7 +193,7 @@
<IconCircles /> <IconCircles />
</div> </div>
<div class="scroll-box gap-2"> <div class="scroll-box gap-2">
{#each model.filter((m) => m.props?.listProps?.optional) as attributeModel} {#each model.filter((m) => m.props?.listProps?.optional || m.props?.listProps?.compression) as attributeModel}
{@const listProps = attributeModel.props?.listProps} {@const listProps = attributeModel.props?.listProps}
{@const value = getObjectValue(attributeModel.key, docObject)} {@const value = getObjectValue(attributeModel.key, docObject)}
{#if listProps?.excludeByKey !== groupByKey && value !== undefined} {#if listProps?.excludeByKey !== groupByKey && value !== undefined}