Don't show the entity modal unless the user clicks on the name or icon

This commit is contained in:
Fabio Manganiello 2023-01-21 23:46:38 +01:00
parent 32e4e60579
commit dabbe031ab
Signed by: blacklight
GPG key ID: D90FBA7F76362774

View file

@ -85,7 +85,10 @@ export default {
},
onClick(event) {
if (event.target.classList.contains('label')) {
if (
event.target.classList.contains('label') ||
event.target.classList.contains('head')
) {
event.stopPropagation()
this.toggleCollapsed()
}
@ -94,7 +97,13 @@ export default {
onEntityUpdate(entity) {
// Check if any of the children have been updated
const entityId = entity?.id
if (entityId == null || !(entityId in this.children))
const isChildUpdate = (
entityId != null &&
this.children &&
entityId in this.children
)
if (!isChildUpdate)
return
this.setJustUpdated()