This repository was archived by the owner on Jun 24, 2021. It is now read-only.

Description
Hi, there seems to be a delay in highlighting the non-English languages like Chinese, Korean, and Japanese. The element is not immediately re-rendered unlike English texts.
Reproducible code
const [highlights, setHighlights] = useState([]);
return (
<View style={{ flex: 1, justifyContent: 'center', alignItems: 'center', marginHorizontal: 10 }}>
<SelectableText
menuItems={["Foo", "Bar", "Highlight"]}
/*
Called when the user taps in a item of the selection menu:
- eventType: (string) is the label
- content: (string) the selected text portion
- selectionStart: (int) is the start position of the selected text
- selectionEnd: (int) is the end position of the selected text
*/
onSelection={({ eventType, content, selectionStart, selectionEnd }) => {
setHighlights([{start: selectionStart, end: selectionEnd}]);
}}
highlightColor={'gray'}
highlights={highlights}
value="테스트입니다"
/>
</View>
)
Expected Behavior
The element should be highlighted immediately.
Any suggestion as to how I can tackle this error? Thanks!