mirror of
https://github.com/hcengineering/platform.git
synced 2026-09-12 12:47:45 +02:00
Cards fixes (#8278)
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user