I am working in react JS. I want to make an input field editable on double click. is it possible in react or should I use a third party library?
I am working in react JS. I want to make an input field editable on double click. is it possible in react or should I use a third party library?
If I understood your question correctly, you could simply add an onDoubleClick event listener to your input and use it to toggle readOnly:
const [readOnly, setReadOnly] = useState(true);
return (
<input readOnly={readOnly} onDoubleClick={() => setReadOnly(false)}/>
)
Yes, it is possible in three ways. You can use Bootstrap 3, Jquery, or JQuery UI as well. Bootstrap is the best option among all these because of having excess material over the internet. You can use "X-Editable". This will provide you to make that specific field editable of will open a pop-over on the input field. Link: https://vitalets.github.io/x-editable/