I have a discussion with colleagues about what is the correct dialog workflow. My scenario is:
- Open dialog
- Enter and validate data (disable submit button if data is invalid).
- Submit the form to API.
- Close dialog
- Show toast message if error on API side.
What my colleague's offer is:
- Open dialog.
- Enter and validate data (disable submit button if data is invalid)
- Submit data to API and keep the dialog open.
- Show error toast (if any) while dialog open.
- Close dialog.
Which solution supposes to be better from a UX perspective?