https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32474
--- Comment #59 from Matt Blenkinsop <[email protected]> --- 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. _______________________________________________ Koha-bugs mailing list [email protected] https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
