input type file is cleaned upon tab change

I'm using "react-tabs", where each tab renders a different form. Some sort of a multi-form. I have an input of type file in my 1st tab. A problem occurs when I use it to upload an image, and switch to a different tab. When you go back to the original tab, the input is empty. I saw a suggestion online to just hide the tab when its not active, but I can't since I'm using a library. I obviously save the input's value in a state, but the user will see an empty input when he goes back to the tab, with "no file chosen" default text. Suggestions?
1 Reply
Aviv
AvivOP2y ago
Want results from more Discord servers?
Add your server