[Koha-bugs] [Bug 32474] Implement infinite scroll in vue-select

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Tue Oct 3 12:58:54 CEST 2023


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32474

--- Comment #59 from Matt Blenkinsop <matt.blenkinsop at ptfs-europe.com> ---
Passing the data to the component from the parent causes issues because we
can't guarantee that there is a match for the "label" property in that data
object. For example, in the case of agreement licenses, if we pass the
agreement license to the select component it doesn't have a "name" property
which is used as the label. The "name" property exists in the license which
appears to be embedded in that object. We'd need to iterate through all the
properties to determine if any of them were embedded objects which might
contain the "name" property and we could have a scenario where there are
agreements and licenses embedded in the same object and both have the "name"
property. This could be very inconsistent and difficult to maintain. To do it
we would have to explicitly pass the actual name of the license itself as a
prop e.g.

:dataToEditLabel="agreement_license.license.name"

This is the cleanest method in terms of code but involves passing another
parameter each time

The only other real option I can think of atm is to fetch it from the API when
the component is rendered and add it to the options for the select. This means
another API request but this is probably more reliable than passing the data
from the parent and will be far easier to maintain when Vue gets used in other
parts of Koha.

Let me know your thoughts

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list