-
Notifications
You must be signed in to change notification settings - Fork 85
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
Make it possible to programmatically focus the vaadin-combo-box #349
Comments
Good idea 👍 I'll keep this issue open for further discussion within our team. Implementation is simple, but we are careful of not adding unnecessary functions/properties to our elements. Deprecating and removing a function from our API is always an hassle 😸 |
Adding API shouldn't be an issue since We could use the same approach which |
@samiheikki this isn't unnecessary -- it is a requirement for business apps to be able to set focus on an input control :-). |
FWIW, this is easy to do by working directly with the input:
But of course this is using a child component (which isn't safe), and I'm not sure this works when shadow DOM is enabled. |
vaadin/vaadin-combo-box#349 Flow-component: vaadin-combo-box
vaadin/vaadin-combo-box#349 Flow-component: vaadin-combo-box
It would be nice if you could add a
focus
function to thevaadin-combo-box
to focus it programmatically.For now im using
comboBoxElement.$.input.focus()
but it doesn't feels right to access the inner Element and with afocus
function it would behave like a "normal" HTMLElement.The text was updated successfully, but these errors were encountered: