refresh inherited attribute list after attr change, closes #1717

This commit is contained in:
zadam 2021-03-07 23:31:56 +01:00
parent 88147f7a0a
commit 9bac2a4819
3 changed files with 14 additions and 8 deletions

12
package-lock.json generated
View file

@ -5728,9 +5728,9 @@
"dev": true
},
"node-abi": {
"version": "2.20.0",
"resolved": "https://registry.npmjs.org/node-abi/-/node-abi-2.20.0.tgz",
"integrity": "sha512-6ldtfVR5l3RS8D0aT+lj/uM2Vv/PGEkeWzt2tl8DFBsGY/IuVnAIHl+dG6C14NlWClVv7Rn2+ZDvox+35Hx2Kg==",
"version": "2.21.0",
"resolved": "https://registry.npmjs.org/node-abi/-/node-abi-2.21.0.tgz",
"integrity": "sha512-smhrivuPqEM3H5LmnY3KU6HfYv0u4QklgAxfFyRNujKUzbUcYZ+Jc2EhukB9SRcD2VpqhxM7n/MIcp1Ua1/JMg==",
"requires": {
"semver": "^5.4.1"
},
@ -8373,9 +8373,9 @@
}
},
"ws": {
"version": "7.4.3",
"resolved": "https://registry.npmjs.org/ws/-/ws-7.4.3.tgz",
"integrity": "sha512-hr6vCR76GsossIRsr8OLR9acVVm1jyfEWvhbNjtgPOrfvAlKzvyeg/P6r8RuDjRyrcQoPQT7K0DGEPc7Ae6jzA=="
"version": "7.4.4",
"resolved": "https://registry.npmjs.org/ws/-/ws-7.4.4.tgz",
"integrity": "sha512-Qm8k8ojNQIMx7S+Zp8u/uHOx7Qazv3Yv4q68MiWWWOJhiwG5W3x7iqmRtJo8xxrciZUY4vRxUTJCKuRnF28ZZw=="
},
"xdg-basedir": {
"version": "4.0.0",

View file

@ -54,7 +54,7 @@
"jsdom": "^16.4.0",
"mime-types": "2.1.29",
"multer": "1.4.2",
"node-abi": "2.20.0",
"node-abi": "2.21.0",
"open": "7.4.2",
"portscanner": "2.2.0",
"rand-token": "1.0.1",
@ -72,7 +72,7 @@
"turndown": "7.0.0",
"joplin-turndown-plugin-gfm": "1.0.12",
"unescape": "1.0.1",
"ws": "7.4.3",
"ws": "7.4.4",
"yauzl": "2.10.0",
"yazl": "2.5.1"
},

View file

@ -83,4 +83,10 @@ export default class InheritedAttributesWidget extends TabAwareWidget {
getInheritedAttributes(note) {
return note.getAttributes().filter(attr => attr.noteId !== this.noteId);
}
entitiesReloadedEvent({loadResults}) {
if (loadResults.getAttributes(this.componentId).find(attr => attr.isAffecting(this.note))) {
this.refresh();
}
}
}