NRPT-167: Autocomplete multiselect fixes #510
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Some fixes to correct issues with the multiselect/autocomplete dropdown boxes in the search component.
Corrected the text input so pressing 'enter' with a partial match will select the first item on the list (you don't have to fill out the whole word completely anymore). After selection, the "options" list is cleared, so the list will display again as expected.
There are two approaches to correcting the issue of having the text retained after entering/selecting an option. The issue is that the autocomplete box must be cleared between searches. Retaining the text will prevent the selection box from displaying or any further autocompletes.
To get around this, we have two options. If you have the

useChips
parameter set tofalse
(the default), your selection text will be applied to the placeholder text of the input box:The one caveat to this approach is that you can't easily see all of your selections once you have several. This issue exists on a regular text box as well of course.
As a secondary option, if you have the

useChips
parameter set totrue
, the placeholder text retains its original value, and material chips are added below the input box:Currently all multiselects are set to the defeault (useChips = false) but it's a pretty easy swap if/where preferred.
See ticket NRPT-167