Bugzilla – Attachment 159407 Details for
Bug 32474
Implement infinite scroll in vue-select
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 32474: Store the selected option label
Bug-32474-Store-the-selected-option-label.patch (text/plain), 2.05 KB, created by
Jonathan Druart
on 2023-11-30 13:02:57 UTC
(
hide
)
Description:
Bug 32474: Store the selected option label
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2023-11-30 13:02:57 UTC
Size:
2.05 KB
patch
obsolete
>From 7f84cfd9fedd4d07f2d331730bec1b0bab0794e2 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Thu, 30 Nov 2023 10:34:54 +0100 >Subject: [PATCH] Bug 32474: Store the selected option label > >It prevents the label to be removed when the selected option is not >longer in the item list. > >Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> > >Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >--- > .../prog/js/vue/components/InfiniteScrollSelect.vue | 8 ++++++++ > 1 file changed, 8 insertions(+) > >diff --git a/koha-tmpl/intranet-tmpl/prog/js/vue/components/InfiniteScrollSelect.vue b/koha-tmpl/intranet-tmpl/prog/js/vue/components/InfiniteScrollSelect.vue >index 9dac42b8087..b997db532b6 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/vue/components/InfiniteScrollSelect.vue >+++ b/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" > /> > </template> >+ <template #selected-option="option"> >+ {{ selectedOptionLabel }} >+ </template> > <template #list-footer> > <li v-show="hasNextPage && !this.search" ref="load"> > {{ $__("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) { >-- >2.34.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 32474
:
144614
|
144719
|
144720
|
145143
|
145144
|
145154
|
150030
|
150031
|
150282
|
150283
|
150284
|
150287
|
150305
|
150308
|
150309
|
153110
|
153111
|
153112
|
153113
|
154094
|
156410
|
156470
|
156471
|
156472
|
156473
|
156474
|
156475
|
156476
|
156477
|
156478
|
156479
|
156481
|
156482
|
156483
|
156504
|
156505
|
159327
|
159328
|
159329
|
159330
|
159340
|
159343
|
159386
|
159389
|
159395
|
159397
|
159398
|
159399
|
159400
|
159401
|
159402
|
159403
|
159404
|
159405
|
159406
| 159407 |
161724