Skip to content

Commit

Permalink
Explicitly provide undefined to useRef()
Browse files Browse the repository at this point in the history
  • Loading branch information
wojtekmaj committed Apr 26, 2024
1 parent ac7c4a3 commit 19487ca
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/react-date-picker/src/DateInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ export default function DateInput({
const monthSelect = useRef<HTMLSelectElement>(null);
const dayInput = useRef<HTMLInputElement>(null);
const [isCalendarOpen, setIsCalendarOpen] = useState(isCalendarOpenProps);
const lastPressedKey = useRef<KeyboardEvent['key']>();
const lastPressedKey = useRef<KeyboardEvent['key'] | undefined>(undefined);

useEffect(() => {
setIsCalendarOpen(isCalendarOpenProps);
Expand Down

0 comments on commit 19487ca

Please sign in to comment.