Began migration of queries to nested sets
This commit is contained in:
@@ -131,6 +131,7 @@ import { snackbar } from '/imports/client/ui/components/snackbars/SnackbarQueue'
|
||||
import softRemoveProperty from '/imports/api/creature/creatureProperties/methods/softRemoveProperty';
|
||||
import restoreProperty from '/imports/api/creature/creatureProperties/methods/restoreProperty';
|
||||
import getPropertyTitle from '/imports/client/ui/properties/shared/getPropertyTitle';
|
||||
import { isAncestor } from '/imports/api/parenting/parentingFunctions';
|
||||
|
||||
export default {
|
||||
name: 'BuildTreeNode',
|
||||
@@ -233,11 +234,10 @@ export default {
|
||||
},
|
||||
watch: {
|
||||
'node._ancestorOfMatchedDocument'(value){
|
||||
this.expanded = !!value ||
|
||||
some(this.selectedNode?.ancestors, ref => ref.id === this.node._id);
|
||||
this.expanded = !!value || isAncestor(this.node, this.selectedNode);
|
||||
},
|
||||
'selectedNode.ancestors'(value){
|
||||
this.expanded = !!some(value, ref => ref.id === this.node._id) || this.expanded;
|
||||
'selectedNode.parentId'(){
|
||||
this.expanded = isAncestor(this.node, this.selectedNode) || this.expanded;
|
||||
},
|
||||
},
|
||||
beforeCreate() {
|
||||
|
||||
Reference in New Issue
Block a user