Cards fixes (#8278)

This commit is contained in:
Denis Bykhov
2025-03-19 20:28:20 +07:00
committed by GitHub
parent d5b11c1ed3
commit e8a5b46ac5
16 changed files with 139 additions and 67 deletions
@@ -4,6 +4,7 @@
import { resolvedLocationStore, Switcher } from '@hcengineering/ui'
import view, { Viewlet, ViewletPreference } from '@hcengineering/view'
import core, { DocumentQuery, Ref, WithLookup } from '@hcengineering/core'
import { deepEqual } from 'fast-equals'
import { createQuery } from '@hcengineering/presentation'
export let viewlet: WithLookup<Viewlet> | undefined
@@ -49,7 +50,7 @@
) {
if (viewlets == null || viewlets.length === 0) return
const newViewlet = viewlets.find((viewlet) => viewlet?._id === activeViewlet[key]) ?? viewlets[0]
if (viewlet?._id !== newViewlet?._id) {
if (viewlet?._id !== newViewlet?._id || !deepEqual(viewlet.config, newViewlet.config)) {
viewlet = newViewlet
setActiveViewletId(newViewlet._id)
dispatch('viewlet', viewlet)