UNPKG
@rc-component/input-number
Version:
latest (1.6.2)
1.6.2
1.6.1
1.6.0
1.5.1
1.5.0
1.4.1
1.4.0
1.3.0
1.2.0
1.1.0
1.0.0
React input-number component
github.com/react-component/input-number
react-component/input-number
@rc-component/input-number
/
lib
/
hooks
/
useCursor.d.ts
6 lines
(5 loc)
•
245 B
TypeScript
View Raw
1
2
3
4
5
6
/** * Keep input cursor in the correct position if possible. * Is this necessary since we have `formatter` which may mass the content? */
export
default
function
useCursor
(
input: HTMLInputElement, focused: boolean
): [
() =>
void
,
() =>
void
];