@@ -, +, @@
---
.../prog/js/vue/components/InfiniteScrollSelect.vue | 8 ++++++++
1 file changed, 8 insertions(+)
--- a/koha-tmpl/intranet-tmpl/prog/js/vue/components/InfiniteScrollSelect.vue
+++ a/koha-tmpl/intranet-tmpl/prog/js/vue/components/InfiniteScrollSelect.vue
@@ -7,6 +7,7 @@
:reduce="item => item[dataIdentifier]"
@open="onOpen"
@close="onClose"
+ @option:selected="onSelected"
@search="searchFilter($event)"
ref="select"
>
@@ -18,6 +19,9 @@
v-on="events"
/>
+
+ {{ selectedOptionLabel }}
+
{{ $__("Loading more options...") }}
@@ -48,6 +52,7 @@ export default {
scrollPage: null,
data: [this.selectedData],
paginationRequired: false,
+ selectedOptionLabel: this.selectedData[this.label],
}
},
computed: {
@@ -131,6 +136,9 @@ export default {
onClose() {
this.observer.disconnect()
},
+ onSelected(option) {
+ this.selectedOptionLabel = option[this.label]
+ },
async infiniteScroll([{ isIntersecting, target }]) {
setTimeout(async () => {
if (isIntersecting) {
--