From dc94123e2a7043eeb8624da6f55e1157ece381e0 Mon Sep 17 00:00:00 2001 From: Maksim Karmatskikh Date: Mon, 20 Nov 2023 16:09:02 +0100 Subject: [PATCH] UBERF-4324: While indexing is still in progress we see undefined (#4017) Signed-off-by: Maxim Karmatskikh --- models/server-core/src/index.ts | 2 +- .../src/components/MentionPopup.svelte | 68 ++++++++++--------- server/core/src/mapper.ts | 2 +- server/core/src/types.ts | 2 +- server/elastic/src/adapter.ts | 7 +- 5 files changed, 45 insertions(+), 36 deletions(-) diff --git a/models/server-core/src/index.ts b/models/server-core/src/index.ts index 1456bc411b..0a92306c04 100644 --- a/models/server-core/src/index.ts +++ b/models/server-core/src/index.ts @@ -63,7 +63,7 @@ export class TObjectDDParticipant extends TClass implements ObjectDDParticipant @Mixin(serverCore.mixin.SearchPresenter, core.class.Class) export class TSearchPresenter extends TClass implements SearchPresenter { searchConfig!: ClassSearchConfig - getSearchObjectId!: Resource + getSearchShortTitle!: Resource getSearchTitle!: Resource } diff --git a/packages/text-editor/src/components/MentionPopup.svelte b/packages/text-editor/src/components/MentionPopup.svelte index 1f7cf020eb..d285afc93f 100644 --- a/packages/text-editor/src/components/MentionPopup.svelte +++ b/packages/text-editor/src/components/MentionPopup.svelte @@ -164,39 +164,43 @@ $: updateItems(query) -
dispatch('changeSize')}> -
-
- {#if items.length === 0 && query !== ''} -
- {/if} - - - - {@const item = items[num]} - {#if item.num === 0} -
-
- {/if} -
- - {@const item = items[num]} - {@const doc = item.item} -
{ - dispatchItem(doc) - }} - > - -
-
-
+{#if (items.length === 0 && query !== '') || items.length > 0} + dispatch('changeSize')}> +
+
+ {#if items.length === 0 && query !== ''} +
+ {/if} + {#if items.length > 0} + + + + {@const item = items[num]} + {#if item.num === 0} +
+
+ {/if} +
+ + {@const item = items[num]} + {@const doc = item.item} +
{ + dispatchItem(doc) + }} + > + +
+
+
+ {/if} +
-
-
- +
+ +{/if}