From 78be0737cbc06665153172e7c8022fe589fd0875 Mon Sep 17 00:00:00 2001 From: Katrina Scialdone Date: Sun, 3 Sep 2023 15:52:02 -0600 Subject: [PATCH] Fix Reference missing from type search in library tree --- .../client/ui/components/tree/TreeSearchInput.vue | 11 +++++++++-- app/imports/client/ui/library/LibraryAndNode.vue | 1 + 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/app/imports/client/ui/components/tree/TreeSearchInput.vue b/app/imports/client/ui/components/tree/TreeSearchInput.vue index ab0f1e40c..d7e16bc76 100644 --- a/app/imports/client/ui/components/tree/TreeSearchInput.vue +++ b/app/imports/client/ui/components/tree/TreeSearchInput.vue @@ -108,7 +108,6 @@ import escapeRegex from '/imports/api/utility/escapeRegex.js'; const filterOptions = []; for (let key in PROPERTIES) { - if (key === 'reference') continue; filterOptions.push({ text: PROPERTIES[key].name, value: key, @@ -121,11 +120,14 @@ export default { type: Object, default: undefined, }, + isLibrary: { + type: Boolean, + default: false + } }, data(){return { typeFilterInput: [], fieldFilters: [{field: 'name', value: undefined}], - filterOptions, menu: false, }}, computed: { @@ -156,6 +158,11 @@ export default { }); return filter; }, + filterOptions() { + return !this.isLibrary + ? filterOptions.filter(p => p.value !== 'reference') + : filterOptions; + }, extraFields() { let extraFields = []; this.fieldFilters?.forEach(fieldFilter => { diff --git a/app/imports/client/ui/library/LibraryAndNode.vue b/app/imports/client/ui/library/LibraryAndNode.vue index 5a7f84d01..5307e9e9c 100644 --- a/app/imports/client/ui/library/LibraryAndNode.vue +++ b/app/imports/client/ui/library/LibraryAndNode.vue @@ -29,6 +29,7 @@ v-model="filter" class="mx-4" @extra-fields-changed="val => extraFields = val" + :is-library="true" />