TypeaheadSearch has a prop, highlightQuery, which allows implementations of the component to turn on visual highlighting of the search query within menu item titles. The Menu component takes in a searchQuery prop, which it then passes to each MenuItem. If the prop is provided to MenuItem, search query highlighting will be enabled for that menu item.
We should consider supporting this in other components that use a Menu, especially those which include a text input, such as Lookup and Combobox. If so, we could implement this in a similar manner as TypeaheadSearch by doing the following:
- Adding a prop called highlightQuery to those components
- If highlightQuery is true, the current search query will be passed to Menu
Acceptance criteria
- Design: determine if this behavior should be supported, and in which components
- If so, open tasks to enable the behavior in those components