diff --git a/README.md b/README.md index da582464..d989ca35 100644 --- a/README.md +++ b/README.md @@ -486,15 +486,17 @@ To keep Autosuggest [accessible](https://rawgit.com/w3c/aria-practices/master/ar * render an input * pass through all the provided `inputProps` to the input +Additionally, the rendered component requires a [forwarded ref](https://reactjs.org/docs/forwarding-refs.html) to the actual `input` component. + Example: ```js -const renderInputComponent = inputProps => ( +const renderInputComponent = React.forwardRef((inputProps, ref) => (
- +
custom stuff
-); +)); ```