mirror of
https://github.com/hcengineering/platform.git
synced 2025-04-24 09:16:43 +00:00
TSK-1243: add scroller to project's components list (#3045)
Signed-off-by: Vyacheslav Tumanov <me@slavatumanov.me>
This commit is contained in:
parent
5ef4205a97
commit
fb240d0316
@ -27,6 +27,7 @@
|
||||
import { onMount } from 'svelte'
|
||||
import ComponentsList from './ComponentsList.svelte'
|
||||
import ComponentTimeline from './ComponentTimeline.svelte'
|
||||
import { Scroller } from '@hcengineering/ui'
|
||||
|
||||
export let _class: Ref<Class<Doc>>
|
||||
export let itemsConfig: (BuildModelKey | string)[]
|
||||
@ -60,21 +61,23 @@
|
||||
/>
|
||||
|
||||
{#if viewMode === 'list'}
|
||||
<ComponentsList
|
||||
bind:this={componentsList}
|
||||
{_class}
|
||||
{itemsConfig}
|
||||
{loadingProps}
|
||||
{components}
|
||||
selectedObjectIds={$selectionStore ?? []}
|
||||
selectedRowIndex={listProvider.current($focusStore)}
|
||||
on:row-focus={(event) => {
|
||||
listProvider.updateFocus(event.detail ?? undefined)
|
||||
}}
|
||||
on:check={(event) => {
|
||||
listProvider.updateSelection(event.detail.docs, event.detail.value)
|
||||
}}
|
||||
/>
|
||||
<Scroller>
|
||||
<ComponentsList
|
||||
bind:this={componentsList}
|
||||
{_class}
|
||||
{itemsConfig}
|
||||
{loadingProps}
|
||||
{components}
|
||||
selectedObjectIds={$selectionStore ?? []}
|
||||
selectedRowIndex={listProvider.current($focusStore)}
|
||||
on:row-focus={(event) => {
|
||||
listProvider.updateFocus(event.detail ?? undefined)
|
||||
}}
|
||||
on:check={(event) => {
|
||||
listProvider.updateSelection(event.detail.docs, event.detail.value)
|
||||
}}
|
||||
/>
|
||||
</Scroller>
|
||||
{:else}
|
||||
<ComponentTimeline
|
||||
bind:this={componentTimeline}
|
||||
|
Loading…
Reference in New Issue
Block a user