mirror of
https://github.com/hcengineering/platform.git
synced 2024-12-23 11:31:57 +03:00
TSK-1445. Fixed ListItem (#3144)
Signed-off-by: Alexander Platov <sas_lord@mail.ru>
This commit is contained in:
parent
c606a037f1
commit
01f6c38daf
@ -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' } },
|
||||
{
|
||||
|
@ -155,25 +155,27 @@
|
||||
</div>
|
||||
{/if}
|
||||
{:else if (!groupByKey || listProps?.excludeByKey !== groupByKey) && !listProps?.optional}
|
||||
{#if listProps?.fixed}
|
||||
<FixedColumn key={`list_item_${attributeModel.props?.listProps.key}`} justify={listProps.fixed}>
|
||||
{#if !(compactMode && listProps?.compression)}
|
||||
{#if listProps?.fixed}
|
||||
<FixedColumn key={`list_item_${attributeModel.props?.listProps.key}`} justify={listProps.fixed}>
|
||||
<svelte:component
|
||||
this={attributeModel.presenter}
|
||||
value={getObjectValue(attributeModel.key, docObject) ?? ''}
|
||||
kind={'list'}
|
||||
onChange={getOnChange(docObject, attributeModel)}
|
||||
{...joinProps(attributeModel, docObject, props)}
|
||||
/>
|
||||
</FixedColumn>
|
||||
{:else}
|
||||
<svelte:component
|
||||
this={attributeModel.presenter}
|
||||
value={getObjectValue(attributeModel.key, docObject) ?? ''}
|
||||
kind={'list'}
|
||||
onChange={getOnChange(docObject, attributeModel)}
|
||||
kind={'list'}
|
||||
compression={listProps?.compression && i !== noCompressed}
|
||||
{...joinProps(attributeModel, docObject, props)}
|
||||
/>
|
||||
</FixedColumn>
|
||||
{:else}
|
||||
<svelte:component
|
||||
this={attributeModel.presenter}
|
||||
value={getObjectValue(attributeModel.key, docObject) ?? ''}
|
||||
onChange={getOnChange(docObject, attributeModel)}
|
||||
kind={'list'}
|
||||
compression={listProps?.compression && i !== noCompressed}
|
||||
{...joinProps(attributeModel, docObject, props)}
|
||||
/>
|
||||
{/if}
|
||||
{/if}
|
||||
{/if}
|
||||
{/each}
|
||||
@ -191,7 +193,7 @@
|
||||
<IconCircles />
|
||||
</div>
|
||||
<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 value = getObjectValue(attributeModel.key, docObject)}
|
||||
{#if listProps?.excludeByKey !== groupByKey && value !== undefined}
|
||||
|
Loading…
Reference in New Issue
Block a user