diff --git a/packages/core/src/client.ts b/packages/core/src/client.ts index d48576d85f..d2902fce94 100644 --- a/packages/core/src/client.ts +++ b/packages/core/src/client.ts @@ -164,6 +164,9 @@ export async function createClient ( let lastTx: number function txHandler (tx: Tx): void { + if (tx === null) { + return + } if (client === null) { txBuffer?.push(tx) } else { diff --git a/packages/ui/src/components/EditBox.svelte b/packages/ui/src/components/EditBox.svelte index 74a46f781c..cbd2a258e6 100644 --- a/packages/ui/src/components/EditBox.svelte +++ b/packages/ui/src/components/EditBox.svelte @@ -65,6 +65,9 @@ }) function computeSize (t: HTMLInputElement | EventTarget | null) { + if (t == null) { + return + } const target = t as HTMLInputElement const value = target.value text.innerHTML = (value === '' ? phTraslate : value) diff --git a/plugins/recruit-resources/src/components/EditVacancy.svelte b/plugins/recruit-resources/src/components/EditVacancy.svelte index 58f51da9c5..7e183fd462 100644 --- a/plugins/recruit-resources/src/components/EditVacancy.svelte +++ b/plugins/recruit-resources/src/components/EditVacancy.svelte @@ -21,7 +21,7 @@ import { Vacancy } from '@hcengineering/recruit' import { FullDescriptionBox } from '@hcengineering/text-editor' import tracker from '@hcengineering/tracker' - import { Button, Component, EditBox, Grid, IconMoreH, showPopup } from '@hcengineering/ui' + import { Button, Component, EditBox, Grid, IconMixin, IconMoreH, showPopup } from '@hcengineering/ui' import { ContextMenu, DocAttributeBar } from '@hcengineering/view-resources' import { createEventDispatcher } from 'svelte' import recruit from '../plugin' @@ -34,6 +34,8 @@ let rawName: string = '' let rawDesc: string = '' + let showAllMixins = false + const dispatch = createEventDispatcher() const client = getClient() @@ -65,16 +67,20 @@ const hierarchy = client.getHierarchy() let mixins: Mixin[] = [] - function getMixins (object: Doc): void { + function getMixins (object: Doc, showAllMixins: boolean): void { if (object === undefined) return const descendants = hierarchy.getDescendants(core.class.Doc).map((p) => hierarchy.getClass(p)) mixins = descendants.filter( - (m) => m.kind === ClassifierKind.MIXIN && !ignoreMixins.has(m._id) && hierarchy.hasMixin(object, m._id) + (m) => + m.kind === ClassifierKind.MIXIN && + !ignoreMixins.has(m._id) && + (hierarchy.hasMixin(object, m._id) || + (showAllMixins && hierarchy.isDerived(object._class, hierarchy.getBaseClass(m._id)))) ) } - $: getMixins(object) + $: getMixins(object, showAllMixins) {#if object} @@ -101,6 +107,20 @@ {/if} +
+ +
{#if dir === 'column'} [], active: Ref | null): Promise { viewlet = viewlets.find((viewlet) => viewlet._id === active) ?? viewlets[0] - setActiveViewletId(viewlet._id) + if (viewlet !== undefined) { + setActiveViewletId(viewlet._id) + } } $: if (!label && title) { diff --git a/plugins/view-resources/src/components/list/ListView.svelte b/plugins/view-resources/src/components/list/ListView.svelte index cb1b1407ee..bbc72eb0b3 100644 --- a/plugins/view-resources/src/components/list/ListView.svelte +++ b/plugins/view-resources/src/components/list/ListView.svelte @@ -25,7 +25,7 @@ const listProvider = new ListSelectionProvider((offset: 1 | -1 | 0, of?: Doc, dir?: SelectDirection) => { if (dir === 'vertical') { // Select next - list.select(offset, of) + list?.select(offset, of) } })