Closed jkcchan closed 3 years ago
Ho @jkcchan, could you elaborate your request? It's not totally clear to me. What do you mean with "the select box"?
@sergiop thanks for the reply. I'm looking for a prop to autofocus the searchbox, using this HTML attribute https://www.w3schools.com/tags/att_input_autofocus.asp . The prop would toggle an autoFocus
prop into this input
element here: https://github.com/sergiop/react-giphy-searchbox/blob/243c54170682ffc0fe493c434f89236e6964a25a/src/components/SearchForm/SearchForm.js#L28-L36
Thanks @jkcchan, now is more clear! 😉
I didn't know the autoFocus
HTML attribute. Since the search input field is the only field we have inside the form, and this behavior looks always useful, I think we can simply add the autoFocus
attribute without managing it with a prop. What do you think? I need to make some tests.
Request: add prop to autofocus the select box on mount