I'm submitting a ... (check one with "x")
[ ] bug report => search github for a similar issue or PR before submitting
[ ] feature request
[x ] support request
Current behavior
Focus is not set on the first textbox or control on loading the form.
Expected behavior
Focus should be set on the first textbox or component on loading the form. A way to set tabindex would be helpful.
Minimal reproduction of the problem with instructions
Open any of the examples, focus is not set on first textbox.
What is the motivation / use case for changing the behavior?
I would like auto focus on the first control on the form
Please tell us about your environment:
Browser: [all | Chrome XX | Firefox XX | IE XX | Safari XX | Mobile Chrome XX | Android X.X Web Browser | iOS XX Safari | iOS XX UIWebView | iOS XX WKWebView ]
Language: [all | TypeScript X.X | ES6/7 | ES5]
Node (for AoT issues): node --version =
just pass true to the focus property:
{
key: 'text',
type: 'input',
focus: true,
...
},
just pass
trueto the focus property:{ key: 'text', type: 'input', focus: true, ... },
Hi @aitboudad can you point me to the code line where the focus is actually set on the element? I mean, how is the field.focus=true converted to the actual focus on the form element?
Most helpful comment
just pass
trueto the focus property: