From 01f6c38daf1e49a24280bb4bc4ecaf355afbca47 Mon Sep 17 00:00:00 2001 From: Alexander Platov Date: Fri, 5 May 2023 08:13:15 +0300 Subject: [PATCH] TSK-1445. Fixed ListItem (#3144) Signed-off-by: Alexander Platov --- models/tracker/src/index.ts | 4 +-- .../src/components/list/ListItem.svelte | 30 ++++++++++--------- 2 files changed, 18 insertions(+), 16 deletions(-) diff --git a/models/tracker/src/index.ts b/models/tracker/src/index.ts index dbb7c562e3..f4acfc3b18 100644 --- a/models/tracker/src/index.ts +++ b/models/tracker/src/index.ts @@ -589,12 +589,12 @@ export function createModel (builder: Builder): void { { key: '', presenter: view.component.DividerPresenter, - props: { type: 'divider', listProps: { optional: true } } + props: { type: 'divider', listProps: { compression: true } } }, { key: '', 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' } }, { diff --git a/plugins/view-resources/src/components/list/ListItem.svelte b/plugins/view-resources/src/components/list/ListItem.svelte index b870c5af28..34af409c93 100644 --- a/plugins/view-resources/src/components/list/ListItem.svelte +++ b/plugins/view-resources/src/components/list/ListItem.svelte @@ -155,25 +155,27 @@ {/if} {:else if (!groupByKey || listProps?.excludeByKey !== groupByKey) && !listProps?.optional} - {#if listProps?.fixed} - + {#if !(compactMode && listProps?.compression)} + {#if listProps?.fixed} + + + + {:else} - - {:else} - + {/if} {/if} {/if} {/each} @@ -191,7 +193,7 @@
- {#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 value = getObjectValue(attributeModel.key, docObject)} {#if listProps?.excludeByKey !== groupByKey && value !== undefined}