Skip to content

Commit

Permalink
Merge pull request #334 from kgscialdone/fix-treesearch-references
Browse files Browse the repository at this point in the history
Fix Reference missing from type search in library tree
  • Loading branch information
ThaumRystra authored Nov 5, 2024
2 parents 37c6128 + 78be073 commit 7c877b9
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
11 changes: 9 additions & 2 deletions app/imports/client/ui/components/tree/TreeSearchInput.vue
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,6 @@ import escapeRegex from '/imports/api/utility/escapeRegex';
const filterOptions = [];
for (let key in PROPERTIES) {
if (key === 'reference') continue;
filterOptions.push({
text: PROPERTIES[key].name,
value: key,
Expand All @@ -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: {
Expand Down Expand Up @@ -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 => {
Expand Down
1 change: 1 addition & 0 deletions app/imports/client/ui/library/LibraryAndNode.vue
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
v-model="filter"
class="mx-4"
@extra-fields-changed="val => extraFields = val"
:is-library="true"
/>
<v-spacer />
<v-fade-transition>
Expand Down

0 comments on commit 7c877b9

Please sign in to comment.