-
Notifications
You must be signed in to change notification settings - Fork 287
New issue
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
Support actions on Input #1235
Comments
@james-w afaik you can't use the
|
This doesn't seem to work for me. I'm trying to do a focus on an input when the modal opens. What am I doing wrong here?
|
@TopherTimeMachine this isn't implemented, I was just discussing a possible approach because |
Is there currently any workarounds for making this work? Or what's the best way to get access to the html element? |
No workaround I'm aware of other than making your own component, which is what we did. |
Summary
I'd like to be able to trigger focus changes to an input element. One way to do this is with a small action to call
.focus()
on the element, but arbitrary actions aren't exposed by the component.Basic example
Motivation
When dynamically adding an input to the page I want to be able to focus it to allow the user to start typing.
autofocus
is supported, but this doesn't always work depending on focus state of the page.Alternatively, exposing a ref to the html element would allow the function to be called in a different way.
Thanks for your work on the library, it's been great to use so far!
The text was updated successfully, but these errors were encountered: