-
Notifications
You must be signed in to change notification settings - Fork 101
Open
Labels
bugSomething isn't workingSomething isn't workingv3Feature and fixes for the major v3 releaseFeature and fixes for the major v3 release
Description
Hi, i have very long text, then it's cause app too laggy
as you can see, i typed too long text by pressing, the button send is can not able to click ( it' took about 4 second to clickable).
When remove mentions input props from InputText, it's work normaly without lag
Here is my. code:
const { textInputProps, triggers } = useMentions({
value: text,
onChange: setText, ==> I think this line cause laggy, because when every text char typed, it's cause re-render
triggersConfig,
patternsConfig,
})
<TextInput
// value={this.props.text}
maxLength={500}
testID={this.props.placeholder}
accessible
accessibilityLabel={this.props.placeholder}
placeholder={this.props.placeholder}
placeholderTextColor={this.props.placeholderTextColor}
multiline={this.props.multiline}
editable={!this.props.disableComposer}
onChange={this.onContentSizeChange}
onContentSizeChange={this.onContentSizeChange}
onChangeText={this.onChangeText}
style={[
styles.textInput,
this.props.textInputStyle,
{
height: this.props.composerHeight,
...Platform.select({
web: {
outlineWidth: 0,
outlineColor: 'transparent',
outlineOffset: 0,
},
}),
},
]}
autoFocus={this.props.textInputAutoFocus}
enablesReturnKeyAutomatically
underlineColorAndroid='transparent'
keyboardAppearance={this.props.keyboardAppearance}
{...this.props.textInputProps} =====> this line
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingv3Feature and fixes for the major v3 releaseFeature and fixes for the major v3 release
