Improve label to display matching term

This commit is contained in:
Rafael 2021-12-06 14:25:27 -03:00 committed by Thomas Zarebczan
parent 4ce3881636
commit 6faaf78fc0

View file

@ -251,7 +251,12 @@ export default function TextareaWithSuggestions(props: Props) {
const renderGroup = (group: string, children: any) => ( const renderGroup = (group: string, children: any) => (
<div className="textareaSuggestions__group"> <div className="textareaSuggestions__group">
<label className="textareaSuggestions__label">{group}</label> <label className="textareaSuggestions__label">
{group}
{suggestionTerm && suggestionTerm.length > 1
? ' ' + __('matching %matching_term%', { matching_term: suggestionTerm })
: ''}
</label>
{children} {children}
<hr className="textareaSuggestions__topSeparator" /> <hr className="textareaSuggestions__topSeparator" />
</div> </div>