fix: add missing dependency array to useEffect in SaveReportChoose.tsx (#5044) (#5111)

This commit is contained in:
Matiss Janis Aboltins
2025-06-06 18:51:11 +01:00
committed by GitHub
parent 098cacd904
commit b22d712b4f
2 changed files with 9 additions and 3 deletions

View File

@@ -1,4 +1,4 @@
import React, { createRef, useEffect, useState } from 'react';
import React, { useRef, useEffect, useState } from 'react';
import { Form } from 'react-aria-components';
import { useTranslation } from 'react-i18next';
@@ -15,7 +15,7 @@ type SaveReportChooseProps = {
};
export function SaveReportChoose({ onApply }: SaveReportChooseProps) {
const inputRef = createRef<HTMLInputElement>();
const inputRef = useRef<HTMLInputElement>(null);
const [err, setErr] = useState('');
const [value, setValue] = useState('');
const { t } = useTranslation();
@@ -24,7 +24,7 @@ export function SaveReportChoose({ onApply }: SaveReportChooseProps) {
if (inputRef.current) {
inputRef.current.focus();
}
});
}, []);
return (
<>