Trying to create an editable dropdown component using prime reacts dropdown.
I want to update state with the new e.value each keystroke, only problem with this is it loses focus of the dropdown everytime.
There is a way to create a reference to the dropdown, but no focus() function available.
Is there another way to handle setting the state of value without losing focus or another function I can use to keep the focus on the editable dropdown input field to allow a user to keep typing?
Using the dropdown extends React.Component structure.
Editable dropdown onChange focus
-
- Posts: 5281
- Joined: 29 Jun 2013, 12:38
Hi,
I couldn't replicate it. Could you please attach a codesandbox link for us to replicate?
Also, maybe you can use the onEditableInputFocus method of dropdown. Exp;
Best Regards,
I couldn't replicate it. Could you please attach a codesandbox link for us to replicate?
Also, maybe you can use the onEditableInputFocus method of dropdown. Exp;
Code: Select all
this.dd.onEditableInputFocus();
...
<Dropdown ref={(el) => this.dd = el} ...
Github Profile: https://github.com/mertsincan
-
- Information
-
Who is online
Users browsing this forum: No registered users and 17 guests