We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
renderInputComponent is not optional? when it's undefined it should render the default input component. For now I have to do this
if (custom) { return ( <Autosuggest {...props} renderInputComponent={() => this.customComponent()} /> ) } return `<Autosuggest {...props} renderInputComponent={() => this.customComponent()} />`
I expect it work like below where I can put condition in jsx, but it does not
return <Autosuggest {...props} renderInputComponent={custom ? () => this.customComponent : undefined} />
Above code initially show a blank input when renderInputComponent is optional.
The text was updated successfully, but these errors were encountered:
Hi,
Just not to specify a render function to renderInputComponent, it would work. In your case, code should be
` if (custom) return <Autosuggest {...props} renderInputComponent={ this.customComponent } />
return <Autosuggest {...props} /> `
My Bests, Hung Tran
Sorry, something went wrong.
No branches or pull requests
Are you reporting a bug?
renderInputComponent is not optional? when it's undefined it should render the default input component. For now I have to do this
I expect it work like below where I can put condition in jsx, but it does not
return <Autosuggest {...props} renderInputComponent={custom ? () => this.customComponent : undefined} />
Above code initially show a blank input when renderInputComponent is optional.
The text was updated successfully, but these errors were encountered: