@@ -, +, @@ re-triggers --- .../prog/js/vue/components/InfiniteScrollSelect.vue | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) --- a/koha-tmpl/intranet-tmpl/prog/js/vue/components/InfiniteScrollSelect.vue +++ a/koha-tmpl/intranet-tmpl/prog/js/vue/components/InfiniteScrollSelect.vue @@ -76,6 +76,11 @@ export default { }, methods: { async fetchInitialData(dataType) { + const currentSelection = this.modelValue + ? this.data.find( + item => this.modelValue === item[this.dataIdentifier] + ) + : null const client = APIClient.erm await client[dataType] .getAll( @@ -88,7 +93,9 @@ export default { ) .then( items => { - this.data = items + this.data = currentSelection + ? [currentSelection, ...items] + : items this.search = "" this.limit = 19 this.scrollPage = 1 --