Closed reznord closed 7 years ago
Can't you already set the autoFocus
prop?
Thanks for the quick reply. Was about to ping you on twitter :P
No, since the inputProps doesn't have that field in that which can be set.
inputProps
is the rest of the props. You can pass whatever you want
Thanks for the solution. Sorry for the issue. But in my opinion that should be added to the inputProps. Not sure whether that would be a good idea or not.
what exactly would you add?
as in make it optional by passing inputProps.autoFocus = inputProps.autoFocus || null
hum that's weird. Why would you default to null
? That's the current behaviour (default to undefined
), I don't see why we should write it explicitly
okay. Makes sense. Closing this issue.
@mathieudutour It would be better to add a prop to the input field so that the user can set the focus of the cursor when the search is invoked.
Would be happy to submit a PR