Merge pull request #82 from prymitive/fix-highlighter

fix(ui): pass custom elements and classes instead of overriding defau…
This commit is contained in:
Łukasz Mierzwa
2018-08-30 23:50:44 +01:00
committed by GitHub
2 changed files with 9 additions and 7 deletions

View File

@@ -19,9 +19,3 @@ input.components-filterinput-wrapper {
input.components-filterinput-wrapper:focus {
width: auto;
}
/* highlighted part of the suggestion - phrase in the input that matches it */
mark.highlight {
padding: 0;
background-color: inherit;
}

View File

@@ -102,7 +102,15 @@ const FilterInput = observer(
};
renderSuggestion = (suggestion, { query, isHighlighted }) => {
return <Highlight search={query}>{suggestion}</Highlight>;
return (
<Highlight
matchElement="span"
matchClass="font-weight-bold"
search={query}
>
{suggestion}
</Highlight>
);
};
renderInputComponent = inputProps => {