fixed isChanged in DialogHeader

Signed-off-by: Andrey Platov <andrey@hardcoreeng.com>
This commit is contained in:
Andrey Platov
2021-09-09 10:58:27 +02:00
parent 3fb14190f9
commit a978d4e1e4
3 changed files with 92 additions and 9 deletions
+4 -2
View File
@@ -16,7 +16,8 @@
"devDependencies": {
"svelte-loader":"^3.1.2",
"sass":"^1.37.5",
"svelte-preprocess":"^4.7.4"
"svelte-preprocess":"^4.7.4",
"@types/deep-equal":"^1.0.1"
},
"dependencies": {
"@anticrm/platform": "~0.6.5",
@@ -28,6 +29,7 @@
"@anticrm/text-editor": "~0.6.0",
"@anticrm/chunter": "~0.6.0",
"@anticrm/contact": "~0.6.0",
"@anticrm/login": "~0.6.0"
"@anticrm/login": "~0.6.0",
"deep-equal": "^2.0.5"
}
}
@@ -37,6 +37,8 @@
import chunter from '@anticrm/chunter'
import contact from '@anticrm/contact'
import equals from 'deep-equal'
const dispatch = createEventDispatcher()
export let space: Ref<Space>
@@ -74,7 +76,7 @@
function isChanged(): void {
for (const key in object) {
if ((newValue as any)[key] !== (object as any)[key]) {
if (!equals((newValue as any)[key], (object as any)[key])) {
changed = true
return
}