mirror of
https://github.com/hcengineering/platform.git
synced 2024-11-25 19:58:30 +03:00
Fix inbox rerender on delete (#6709)
Signed-off-by: Kristina Fefelova <kristin.fefelova@gmail.com>
This commit is contained in:
parent
b24027b2ea
commit
f1da8ff9b1
@ -28,7 +28,7 @@
|
|||||||
export let lazy = false
|
export let lazy = false
|
||||||
export let minHeight: string | null = null
|
export let minHeight: string | null = null
|
||||||
export let highlightIndex: number | undefined = undefined
|
export let highlightIndex: number | undefined = undefined
|
||||||
const getKey: (index: number) => string = (index) => index.toString()
|
export let getKey: (index: number) => string = (index) => index.toString()
|
||||||
|
|
||||||
const refs: HTMLElement[] = []
|
const refs: HTMLElement[] = []
|
||||||
|
|
||||||
|
@ -171,7 +171,8 @@
|
|||||||
|
|
||||||
const [id, _class] = decodeObjectURI(loc?.loc.path[3] ?? '')
|
const [id, _class] = decodeObjectURI(loc?.loc.path[3] ?? '')
|
||||||
const _id = await parseLinkId(linkProviders, id, _class)
|
const _id = await parseLinkId(linkProviders, id, _class)
|
||||||
const context = _id ? $contextByDocStore.get(_id) : undefined
|
const thread = loc?.loc.path[4] as Ref<ActivityMessage>
|
||||||
|
const context = $contextByDocStore.get(thread) ?? $contextByDocStore.get(_id)
|
||||||
|
|
||||||
selectedContextId = context?._id
|
selectedContextId = context?._id
|
||||||
|
|
||||||
@ -180,7 +181,6 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
const selectedMessageId = loc?.loc.query?.message as Ref<ActivityMessage> | undefined
|
const selectedMessageId = loc?.loc.query?.message as Ref<ActivityMessage> | undefined
|
||||||
const thread = loc?.loc.path[4] as Ref<ActivityMessage> | undefined
|
|
||||||
|
|
||||||
if (thread !== undefined) {
|
if (thread !== undefined) {
|
||||||
const fn = await getResource(chunter.function.OpenThreadInSidebar)
|
const fn = await getResource(chunter.function.OpenThreadInSidebar)
|
||||||
|
@ -93,6 +93,11 @@
|
|||||||
$: if (element != null) {
|
$: if (element != null) {
|
||||||
element.focus()
|
element.focus()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function getContextKey (index: number): string {
|
||||||
|
const contextId = displayData[index][0]
|
||||||
|
return contextId ?? index.toString()
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<!-- svelte-ignore a11y-no-noninteractive-tabindex -->
|
<!-- svelte-ignore a11y-no-noninteractive-tabindex -->
|
||||||
@ -108,6 +113,7 @@
|
|||||||
kind="full-size"
|
kind="full-size"
|
||||||
colorsSchema="lumia"
|
colorsSchema="lumia"
|
||||||
lazy={true}
|
lazy={true}
|
||||||
|
getKey={getContextKey}
|
||||||
>
|
>
|
||||||
<svelte:fragment slot="item" let:item={itemIndex}>
|
<svelte:fragment slot="item" let:item={itemIndex}>
|
||||||
{@const contextId = displayData[itemIndex][0]}
|
{@const contextId = displayData[itemIndex][0]}
|
||||||
|
Loading…
Reference in New Issue
Block a user