LP#1831785: eg-combobox support automatic pcrud-based IDL data sources
authorJason Etheridge <jason@EquinoxInitiative.org>
Wed, 5 Jun 2019 15:42:29 +0000 (11:42 -0400)
committerBill Erickson <berickxx@gmail.com>
Fri, 14 Jun 2019 15:53:05 +0000 (11:53 -0400)
commita6558b52604d58dfb0a26ecb02803cf0e52edf90
tree1cc3b5905da2e87b876ae0399235c2f129216185
parentc5a5e40d0ff22d5884421cd1145aa9da5ad77ae0
LP#1831785: eg-combobox support automatic pcrud-based IDL data sources

This patch adds new idlClass and idlField attributes to eg-combobox to
enable it to automatically construct a pcrud-base data source. The
idlClass property specifies which table/class to use as the base
data source, while idlField specifies the label to display. If idlField
is not supplied, the label field defaults to "name".

It also adds an asyncSupportsEmptyTermClick option to specify that an
async data source (whether or not it is automatically built) is
expected to never return more than a couple hundred entries or so;
when supplied, it will allow fetching the entire contents of the
data source when the user clicks on the drop-down.

To test
-------
[1] Apply the patch and exercise the comboboxes on the
     Angular sandbox page (/eg2/en-US/staff/sandbox)

Sponsored-by: MassLNC
Sponsored-by: Georgia Public Library Service
Sponsored-by: Indiana State Library
Sponsored-by: CW MARS
Sponsored-by: King County Library System
Signed-off-by: Jason Etheridge <jason@EquinoxInitiative.org>
Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>
Signed-off-by: Bill Erickson <berickxx@gmail.com>
Open-ILS/src/eg2/src/app/share/combobox/combobox.component.ts
Open-ILS/src/eg2/src/app/staff/sandbox/sandbox.component.html