Together
Together copied to clipboard
Create event modal fails to reset without user input
Describe the bug
After creating an event, a success message is displayed along with an option to create another event. If the user instead closes the modal and reopens it using the plus icon on any day or the "add event" button, the modal continues to display the success message and the option to create another event instead of resetting its state.
To Reproduce
Steps to reproduce the behavior:
- Create any successful event.
- Close the modal by clicking close or clicking outside of the modal.
- Attempt to create a new event.
- When the modal reopens, notice it displays the previous success message.
You will need to click on "New Event" to proceed with creating a new event.
Expected behavior
After creating an event and closing the modal, the modal should reset when reopened. It should no longer display the previous success message with the option to create another event. The modal should return to its initial state, ready for a new event creation process. The current behavior can confuse users who need to enter multiple events in the same session.
Screenshots
Which Branch should this fix be Pulled into?
PR into [branchName]
Device Information
N/A
Additional context
N/A
hey, could be interested in trying to tackle this, what would be the timeframe for completing?
@dreymoreau I have assigned it to you and added the 'Low Priority' tag. Feel free to take a look at it when you have a chance and see what you can find out.
Hi @intelagense, can I take this issue?
Sure!
While working on this, I found the following bug in the event form where date validation is not triggered:
https://github.com/Together-100Devs/Together/assets/25715951/88b4cf19-b8f8-4a5b-b222-8edc450f7153
Should we create a separate issue for it and reset the form only if the event has been successfully added? Or reset the form every time it is closed, which will solve both the current issue and the bug above.