Compare commits
2 Commits
open-relea
...
open-relea
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
66bae174dd | ||
|
|
facf1c8866 |
@@ -6,11 +6,10 @@ export const useImportButtonData = () => {
|
||||
const submitImportGradesButtonData = thunkActions.grades.useSubmitImportGradesButtonData();
|
||||
|
||||
const fileInputRef = useRef();
|
||||
const hasFile = fileInputRef.current && fileInputRef.current.files[0];
|
||||
|
||||
const handleClickImportGrades = () => hasFile && fileInputRef.current.click();
|
||||
const handleClickImportGrades = () => fileInputRef.current?.click();
|
||||
const handleFileInputChange = () => {
|
||||
if (hasFile) {
|
||||
if (fileInputRef.current?.files[0]) {
|
||||
const clearInput = () => {
|
||||
fileInputRef.current.value = null;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user