Open eldyvoon opened 6 years ago
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
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.