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

Editor has a "@" sign as it's default value no matter what I do #20

Open
bobber205 opened this issue Feb 26, 2020 · 2 comments
Open

Editor has a "@" sign as it's default value no matter what I do #20

bobber205 opened this issue Feb 26, 2020 · 2 comments

Comments

@bobber205
Copy link

                        <Editor
                            list={this.state.user_suggestions}
                            // initialValue={this.state.displayText}
                            // clearInput={}
                            value={''}
                            onChange={({displayText, text}) => { console.log('display text', displayText, text); this.setState({ text, displayText }); }}
                            showEditor={true}
                            editorStyles= {{
                                mainContainer: {
                                    borderColor: 'transparent',
                                    width: window_width - 30
                                },
                                input: {...commonly_used_styles.typicalTextInput, 
                                    borderWidth: 0, 
                                    color: 'black',
                                    borderColor: button_styling.borderColor, 
                                    width: window_width - 30, 
                                    textAlignVertical: 'top', 
                                    textAlign: 'left', 
                                    height: 100, 
                                    marginBottom: 5 
                                }
                            }}
                            placeholder={'Please enter something'}
                            toggleEditor={() => {return true;}}
                            showMentions={true}
                            onHideMentions={this.onHideMentions}
                        />

I've tried with and without a value for initialValue and it always looks like this.

image

If I have a value for initialValue it looks like initialValue={'initial_value'}

image

I've looked through the code and can't find why this is happening. Anyone know why? I assume this is a legit bug?

@rajenderkumar09
Copy link

Having the same issue

@dabakovich
Copy link

You can try a react-native-controlled-mentions that is not rich in configuration yet but enough stable for use in projects.
https://www.npmjs.com/package/react-native-controlled-mentions

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

3 participants