mirror of
https://github.com/directus/directus.git
synced 2026-04-25 03:00:53 -04:00
Make folders hidden by default in system collection interface (#18362)
* make folders hidden by default in system collection interface * Create green-stingrays-shake.md * Remove prop --------- Co-authored-by: Rijk van Zanten <rijkvanzanten@me.com>
This commit is contained in:
5
.changeset/green-stingrays-shake.md
Normal file
5
.changeset/green-stingrays-shake.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"@directus/app": patch
|
||||
---
|
||||
|
||||
Made folders hidden by default in system collection-chooser interface
|
||||
@@ -9,8 +9,8 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import { defineComponent, computed } from 'vue';
|
||||
import { useCollectionsStore } from '@/stores/collections';
|
||||
import { computed, defineComponent } from 'vue';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
|
||||
export default defineComponent({
|
||||
@@ -52,10 +52,16 @@ export default defineComponent({
|
||||
});
|
||||
|
||||
const items = computed(() => {
|
||||
return collections.value.map((collection) => ({
|
||||
text: collection.name,
|
||||
value: collection.collection,
|
||||
}));
|
||||
return collections.value.reduce<{ text: string; value: string }[]>((acc, collection) => {
|
||||
if (collection.type !== 'alias') {
|
||||
acc.push({
|
||||
text: collection.name,
|
||||
value: collection.collection,
|
||||
});
|
||||
}
|
||||
|
||||
return acc;
|
||||
}, []);
|
||||
});
|
||||
|
||||
return { items, t };
|
||||
|
||||
Reference in New Issue
Block a user