mirror of
https://github.com/hcengineering/platform.git
synced 2025-04-21 15:59:15 +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
@ -1,14 +1,14 @@
|
|||||||
<!--
|
<!--
|
||||||
// Copyright © 2022 Hardcore Engineering Inc.
|
// Copyright © 2022 Hardcore Engineering Inc.
|
||||||
//
|
//
|
||||||
// Licensed under the Eclipse Public License, Version 2.0 (the "License");
|
// Licensed under the Eclipse Public License, Version 2.0 (the "License");
|
||||||
// you may not use this file except in compliance with the License. You may
|
// you may not use this file except in compliance with the License. You may
|
||||||
// obtain a copy of the License at https://www.eclipse.org/legal/epl-2.0
|
// obtain a copy of the License at https://www.eclipse.org/legal/epl-2.0
|
||||||
//
|
//
|
||||||
// Unless required by applicable law or agreed to in writing, software
|
// Unless required by applicable law or agreed to in writing, software
|
||||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
//
|
//
|
||||||
// See the License for the specific language governing permissions and
|
// See the License for the specific language governing permissions and
|
||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
-->
|
-->
|
||||||
@ -27,6 +27,7 @@
|
|||||||
import { onMount } from 'svelte'
|
import { onMount } from 'svelte'
|
||||||
import ComponentsList from './ComponentsList.svelte'
|
import ComponentsList from './ComponentsList.svelte'
|
||||||
import ComponentTimeline from './ComponentTimeline.svelte'
|
import ComponentTimeline from './ComponentTimeline.svelte'
|
||||||
|
import { Scroller } from '@hcengineering/ui'
|
||||||
|
|
||||||
export let _class: Ref<Class<Doc>>
|
export let _class: Ref<Class<Doc>>
|
||||||
export let itemsConfig: (BuildModelKey | string)[]
|
export let itemsConfig: (BuildModelKey | string)[]
|
||||||
@ -60,21 +61,23 @@
|
|||||||
/>
|
/>
|
||||||
|
|
||||||
{#if viewMode === 'list'}
|
{#if viewMode === 'list'}
|
||||||
<ComponentsList
|
<Scroller>
|
||||||
bind:this={componentsList}
|
<ComponentsList
|
||||||
{_class}
|
bind:this={componentsList}
|
||||||
{itemsConfig}
|
{_class}
|
||||||
{loadingProps}
|
{itemsConfig}
|
||||||
{components}
|
{loadingProps}
|
||||||
selectedObjectIds={$selectionStore ?? []}
|
{components}
|
||||||
selectedRowIndex={listProvider.current($focusStore)}
|
selectedObjectIds={$selectionStore ?? []}
|
||||||
on:row-focus={(event) => {
|
selectedRowIndex={listProvider.current($focusStore)}
|
||||||
listProvider.updateFocus(event.detail ?? undefined)
|
on:row-focus={(event) => {
|
||||||
}}
|
listProvider.updateFocus(event.detail ?? undefined)
|
||||||
on:check={(event) => {
|
}}
|
||||||
listProvider.updateSelection(event.detail.docs, event.detail.value)
|
on:check={(event) => {
|
||||||
}}
|
listProvider.updateSelection(event.detail.docs, event.detail.value)
|
||||||
/>
|
}}
|
||||||
|
/>
|
||||||
|
</Scroller>
|
||||||
{:else}
|
{:else}
|
||||||
<ComponentTimeline
|
<ComponentTimeline
|
||||||
bind:this={componentTimeline}
|
bind:this={componentTimeline}
|
||||||
|
Loading…
Reference in New Issue
Block a user