- 
                Notifications
    
You must be signed in to change notification settings  - Fork 65
 
Add focus event #18
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
base: main
Are you sure you want to change the base?
Add focus event #18
Conversation
| 
           I'm interested in this PR, but I'd like to understand it better. Could you give a little more information about how'd you see using this event? I definitely think more events could be useful (#28), but I want to make sure we understand the use cases really well before adding too many. An API is a fragile thing, too few and there aren't enough options, too many and it's a mess to wade through. Additionally, I know it seems petty, but could you make a separate PR for the id change? I mostly try to keep PRs to a single related purpose. The   | 
    
| 
           Hi, I am planning to create another issue but I saw this. I don't know if the "focus event" is the same with my issue. So I tried to implement the typeahead in modal and I would like to have it in autofocus. So when the modal loads, the focus should be on the typeahead. Is there a workaround to do this as I tried to add an ID but it doesn't add/append in the input element itself.  | 
    
| 
           @darrinmn9, I know you were interested in this PR. I wasn't sure if you were interested in this implementation of the general idea. I'm onboard with the idea, but the PR could use a couple of touchups as I noted in my original comment.  | 
    
| 
           agreed, and like you said, it should probably be 2 separate PRs, 1 for the   | 
    
Focus event may be useful for loading initial data for list instead of using
mountedhook for that case.Also I added
idattribute for input for use with<label for="...">.