Courses app: Location filters typeahead not working as expected

Description

Overview: In the Inventory app, the effective location filter allows for typing ahead and will capture any locations containing your search term, regardless of where the term appears in the location. For example, for the location 'acq mono', you can type in the word 'mono' and have the correct location appear.

In the Courses app, the location filter's typeahead appears to be left-anchored. So, in the example above, 'mono' does not return any results, but 'acq' does. This behavior persists in all the location filters within the Courses app:

Courses: Location

Reserves: Permanent location

Reserves: Temporary location

Steps to Reproduce:

  1. Log into Lotus Bugfest

  2. Open the Courses app

  3. In the courses segment for searching, click in the location filter and type in 'mono'

Expected Results: see several location options appear, as in Inventory
Actual Results:  no locations found
**

Additional Information: The typeahead is also producing a UI error if you try to type in '['. This does not happen in Inventory and should not happen in Courses either.

URL:

Interested parties:  

CSP Request Details

None

CSP Rejection Details

None

Potential Workaround

None

Checklist

hide

TestRail: Results

Activity

Show:

Mike TaylorNovember 1, 2022 at 3:48 PM

Done.

Charlotte WhittNovember 1, 2022 at 3:24 PM

So cool, thanks . Can I ask you to fill in the Release Fix Version/s information.

Mike TaylorOctober 28, 2022 at 4:19 PM

I think this is done now. Y'all should be able to see it in action tomorrow on snapshot.

(Since this is arguably a bugfix, I don't think it will be a problem to release it a day after the New Functionality deadline for Nolana.)

Mike TaylorOctober 28, 2022 at 4:02 PM

Oh, hold the phone! There is a way to do this using the existing filter prop to <MultiSelectionFilter>, which it passes straight through to stripes-components' <MultiSelection>. That is documented, albeit not really adequately, at https://github.com/folio-org/stripes-components/blob/master/lib/MultiSelection/readme.md#common-props

Mike TaylorOctober 28, 2022 at 3:06 PM

Having looked at this in detail now, and read lots of code, I have to concur with that this is really a feature request. While Course Reserves uses the standard <MultiSelectionFilter> component (from stripes-smart-components), Inventory uses its own solution rolled from bits and pieces. We definitely don't want to copy the Inventory code across.

I think the right way to address this requirement is to extend <MultiSelectionFilter> to take an optional parameter specifying how to do the candidate-value matching, and to use that.

Done

Details

Assignee

Reporter

Labels

Priority

Sprint

Development Team

Thor

Fix versions

Release

Nolana (R3 2022) Bug Fix

RCA Group

Incomplete/missing requirements

Affected Institution

!!!ALL!!!

TestRail: Cases

Open TestRail: Cases

TestRail: Runs

Open TestRail: Runs

Created June 22, 2022 at 1:41 PM
Updated November 1, 2022 at 3:48 PM
Resolved October 28, 2022 at 4:18 PM
TestRail: Cases
TestRail: Runs