Skip to content

Commit caa9ce8

Browse files
fix: lint
1 parent d7a17cd commit caa9ce8

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/PickerInput/Selector/Input.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,8 @@ const Input = React.forwardRef<InputRef, InputProps>((props, ref) => {
9797
// ========================= Refs =========================
9898
const holderRef = React.useRef<HTMLDivElement>(null);
9999
const inputRef = React.useRef<HTMLInputElement>(null);
100+
// When mousedown get focus, defer selection to mouseUp so click position is used
101+
const mouseDownRef = React.useRef(false);
100102

101103
React.useImperativeHandle(ref, () => ({
102104
nativeElement: holderRef.current,
@@ -170,8 +172,6 @@ const Input = React.forwardRef<InputRef, InputProps>((props, ref) => {
170172
// ======================== Mouse =========================
171173
// When `mouseDown` get focus, it's better to not to change the selection
172174
// Since the up position maybe not is the first cell
173-
const mouseDownRef = React.useRef(false);
174-
175175
const onFormatMouseDown: React.MouseEventHandler<HTMLInputElement> = () => {
176176
mouseDownRef.current = true;
177177
};

0 commit comments

Comments
 (0)