Include info field in the multiselect search #7089
Closed
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.
Description
This PR enhances the multiselect field in the panel to optionally include the
infofield in the search.Summary of changes
filteredOptionsmethod to optionally include theinfofield in the searchinfofield if the field is included in the searchReasoning
When displaying longer text within the tags of the multiselect field, the tags can become excessively large and hard to read. In those cases, it makes sense to use the
infofield for additional information. However, theinfofield is not included in the search. This can be desirable, but also leads to tags being undisoverable if a user is searching for text included in theinfofield rather than thetextfield.Additional context
We are currently utilising the multiselect component to categorise content with a complex tree structure for the new CMS for the annual Rundgang at UdK Berlin. Users are required to select the leaf node at the end of a tree to categorise a page. Our goal is to display the paths as follows:
The problem arises when users are searching for any of the "branches" as they receive no results due to only the
textfield being searchable. The current workaround is to display the entire path within thetextfield, which leads to excessively long tags and is not a viable solution.Changelog
Fixes
info field not being searchable
Breaking changes
none
Docs
Ready?
For review team