Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[PERFORMANCE ALERT] plz test with me for this issue: very long text cause laggy keyboard #92

Open
fukemy opened this issue Jul 15, 2022 · 2 comments

Comments

@fukemy
Copy link

fukemy commented Jul 15, 2022

Hi, i have very long text, then it's cause app too laggy

Screen Shot 2022-07-15 at 11 58 07

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
@fukemy
Copy link
Author

fukemy commented Jul 20, 2022

@dabakovich can u confirm this issue, i have no solution for this

@AkshayItaliya01
Copy link

any solution ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants