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
1 changed files with 11 additions and 2 deletions

View File

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