on 03-25-2024 2:43 PM
Hi,
Has anybody already used the View Function "Focus input"?
Expectation:
If the Focus input function is used on a the Event "Page mounted" I would expect to set the cursor focus on the field, that was chosen behind the focus input function.
Result:
Currently the focus isn't set on the expected field and the browser dev tools are giving me the following error message:
Any ideas? Am I doing something wrong or is this a bug?
Regards,
Patrick
Hello there,
Well, my initial idea would be that the 'Focus input' only works with the primitive input field.
Please attempt a scenario where you would use the primitive input instead of the 'Input field' component as shown here:
I understand that this would require you to wrap it into a container and add a text element if you want to also have a label, but if you need focus triggering automatically this is your quickest way of implementing it.
Finally, a friendly suggestion make sure to name every component with a meaningful name, so that you can potentially easily identify your components in the selection windows.
Best wishes.
PS. We have utilised this on our login page to automatically send the user to the email input if the page is loaded, and also on some other locations throughout our application.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you very much for the feedback.
This solved my issue 🙂 It was the usage of the primitive input. I was not aware of that.
Thank you very much.
Regards,
Patrick
User | Count |
---|---|
72 | |
9 | |
8 | |
7 | |
6 | |
5 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.