SnapShot
SnapShot copied to clipboard
Clear search input on submit
https://github.com/Yog9/SnapShot/blob/406d69553793e0d85871069326bfa22ee1566ad7/src/App.js#L13
If this line is used for clearing the search input then it is not being cleared.
I suggest adding setSearchEntry("");
after handleSubmit call
https://github.com/Yog9/SnapShot/blob/406d69553793e0d85871069326bfa22ee1566ad7/src/components/Form.js#L12
ishaan can you pls tell me how this handlechange is working i dont understand it.
sorry ishaan but i can't see my committed code in ur main code. im new in opensource.
Hi @kushalShukla-web , this repo belongs to @Yog9 , so for your changes to reflect you need create Pull Request on the repo of @Yog9 . I would recommend this video for open source guidance. I hope this helps you.
I want to work on this issue. Please assign me.
Hi @Yog9 , I have a question regarding the handle submit function which is written in App.js. We initialized the searchEntry state in Form.js and just sending the updated searchEntry to handle submit function. But we cannot update the state and clear the search bar. But instead we can control handle submit function in Form.js and update the searchEntry state. My fix: I removed the handleSubmit prop in <Header /> and removed the handle submit function from App.js and handle that in Form.js. Is this the correct fix? Or anything else is required, please let me know. Code change in App.js: