I'm wondering if there is any way to detect that numeric input's arrow has been clicked. OnChange event function is called then arrow has been clicked or input value has been changed with keyboard. I want to find a way to detect change when only arrow has been clicked.
Here is link of a little Demo and it's code
import React from "react";
export default function App() {
const [log, setLog] = React.useState("");
return (
<div className="App">
<input
type="number"
onChange={e => {
setLog(log + "+");
}}
/>
<br />
<span>{log}</span>
</div>
);
}

I don't think you can attach an event on the arrows.
Though a workaround is possible, It assumes that if the difference between prev value and the current value is 1 then the arrow was clicked.
A couple of points to note: