diff --git a/app/frontend/editor/components/kit/collection-item-input.vue b/app/frontend/editor/components/kit/collection-item-input.vue index 2df1c83e..63781e3d 100644 --- a/app/frontend/editor/components/kit/collection-item-input.vue +++ b/app/frontend/editor/components/kit/collection-item-input.vue @@ -12,6 +12,7 @@ :emptyLabel="$t(`collectionItemInput.select.emptyLabel`)" :fetchList="(q) => services.collectionItem.findAll(collectionId, { q })" :clearEnabled="true" + :displayAll="true" buttonClass="h-10" v-model="selectedCollectionItem" > diff --git a/app/frontend/editor/components/kit/select-input.vue b/app/frontend/editor/components/kit/select-input.vue index c303bb5c..2e8161d4 100644 --- a/app/frontend/editor/components/kit/select-input.vue +++ b/app/frontend/editor/components/kit/select-input.vue @@ -106,8 +106,11 @@ export default { clearEnabled: { type: Boolean, default: false }, withLabel: { type: Boolean, default: true }, buttonClass: { type: [Object, String], default: () => ({}) }, + displayAll: { type: Boolean, default: false }, }, data() { + if (this.displayAll) this.fetch() + return { isOpen: false, q: undefined, @@ -128,7 +131,7 @@ export default { }, methods: { focus() { - this.toggle(); + this.toggle() }, toggle() { this.isOpen = !this.isOpen @@ -177,13 +180,15 @@ export default { reset() { this.isOpen = false this.q = null - this.list = undefined + if (!this.displayAll) { + this.list = undefined + } this.focusIndex = undefined }, }, watch: { q() { - if (!this.q) return + if (!this.q && !this.displayAll) return this.debouncedFetch() }, isOpen() {