LP1916949: combobox asyncSupportsEmptyTermClick works again user/mccanna/lp1916949_async_comboboxes_show_values_on_click_signoff
authorJane Sandberg <sandbej@linnbenton.edu>
Fri, 26 Feb 2021 01:04:13 +0000 (17:04 -0800)
committerTerran McCanna <tmccanna@georgialibraries.org>
Wed, 17 Mar 2021 17:45:01 +0000 (13:45 -0400)
commit717eb28756fc6d53cd891aefcfd9a9caf83ba8e4
tree14f4d222de754a6abaa59c6ae589d7ba96712d62
parent3cfeeb87cbce69dc1fccb6d8069677df1adfbfa1
LP1916949: combobox asyncSupportsEmptyTermClick works again

This fixes two lines that were getting in the way of the desired
behavior of opening an async combobox (particularly those automagical
pcrud ones with an idlClass input) on user click when
asyncSupportsEmptyTermClick="true".

Basically, the addAsyncEntries method would accept _CLICK_ as a search
term.  However, it would then return '' instead of _CLICK_ as an
Observable value, so the filter method had no idea it was a click event.
Additionally, even if _CLICK_ had gotten through to the filter method,
it wasn't allowed to display those freshly-fetched pcrud values, since
asyncDataSources with searchterm _CLICK_ were needlessly excluded.

Also removes some imports that are no longer needed, just to keep things
tidy.

To test:
1) Apply this patch.
2) Go to Booking > Create Reservation
3) Click inside the Resource Type box.
4) Note that the available resource types display!

To make sure that asyncSupportsEmptyTermClick="false" still also
works as expected:
5) Go to Acquisitions > General Search.
6) Perform an empty search.
7) In the search results grid, some filter comboboxes have
   asyncSupportsEmptyTermClick, while others do not.  For example, the
   Status column has it, so if you click in the Status filter, a list of
   possible statuses will show up.  However, the Selecting User column
   (you have to enable this column) does not have it, so if you click in
   that filter, it doesn't automatically display a useless list of 100
   users.

Signed-off-by: Jane Sandberg <sandbej@linnbenton.edu>
Signed-off-by: Terran McCanna <tmccanna@georgialibraries.org>
Open-ILS/src/eg2/src/app/share/combobox/combobox.component.ts