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

Selecting languages other than English (Chinese, Korean, Japanese) creates a delay in highlighting #71

Description

@sanghaya

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions