Fixed slot fillers in fill dialog not showing children when expanded
This commit is contained in:
@@ -76,7 +76,7 @@ import numberToSignedString from '/imports/api/utility/numberToSignedString';
|
||||
import PropertyIcon from '/imports/client/ui/properties/shared/PropertyIcon.vue';
|
||||
import MarkdownText from '/imports/client/ui/components/MarkdownText.vue';
|
||||
import TreeNodeList from '/imports/client/ui/components/tree/TreeNodeList.vue';
|
||||
import { getFilter, docsToForest as nodeArrayToTree } from '/imports/api/parenting/parentingFunctions';
|
||||
import { getFilter, docsToForest } from '/imports/api/parenting/parentingFunctions';
|
||||
import CreatureProperties from '/imports/api/creature/creatureProperties/CreatureProperties';
|
||||
import { some } from 'lodash';
|
||||
|
||||
@@ -166,7 +166,7 @@ export default {
|
||||
return prop.left > range.left && prop.right < range.right;
|
||||
});
|
||||
});
|
||||
return nodeArrayToTree(descendants);
|
||||
return docsToForest(descendants);
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
/>
|
||||
<tree-node-list
|
||||
group="library-node-expansion"
|
||||
:root="{collection: 'libraryNodes', id: id}"
|
||||
:children="propertyChildren"
|
||||
@selected="clickChild"
|
||||
/>
|
||||
@@ -26,7 +27,7 @@
|
||||
</template>
|
||||
|
||||
<script lang="js">
|
||||
import { filterToForest } from '/imports/api/parenting/parentingFunctions';
|
||||
import { docsToForest, getFilter } from '/imports/api/parenting/parentingFunctions';
|
||||
import LibraryNodes from '/imports/api/library/LibraryNodes';
|
||||
import propertyViewerIndex from '/imports/client/ui/properties/viewers/shared/propertyViewerIndex';
|
||||
import TreeNodeList from '/imports/client/ui/components/tree/TreeNodeList.vue';
|
||||
@@ -71,7 +72,11 @@ export default {
|
||||
return LibraryNodes.findOne(this.id);
|
||||
},
|
||||
propertyChildren() {
|
||||
return filterToForest(LibraryNodes, this.id, {});
|
||||
const descendants = LibraryNodes.find({
|
||||
...getFilter.descendants(this.model),
|
||||
removed: { $ne: true },
|
||||
}).fetch();
|
||||
return docsToForest(descendants);
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
@@ -301,8 +301,7 @@ Meteor.publish('descendantLibraryNodes', function (nodeId) {
|
||||
if (!libraryId || !node) return [];
|
||||
this.autorun(function () {
|
||||
let userId = this.userId;
|
||||
let library = Libraries.findOne(libraryId);
|
||||
try { assertViewPermission(library, userId) }
|
||||
try { assertDocViewPermission(node, userId) }
|
||||
catch (e) {
|
||||
return this.error(e);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user