Who has a best practice for a good user experience to (automatically) save event changes of input fields?
What I have tried so far:
simple save button: works fine, but is yet another visible button that requires pressing
automatically save on changes (with or without debouncing): when directly hooked up to an API call, especially with a rich text input field this causes a glitch/disturbance when typing through the moment of the API call - resulting in a messy experience (where the focus on the field is lost requiring the user to re-select the field to continue typing).
pressing enter on a field doensât work for all input field, such as a rich text.
double mouse click works fine on desktop, but not on tablet/mobile.
BEST ONE I FOUND SO FAR: automatically save on changes to a variable (object) that is saved in the background via an API-call - detached from the work done by the user. â this seems by far the smoothes/least noticeable method, but Iâm just wondering how to best automate the API-call (is it perhaps a timer that triggers the API after a few seconds of inactivity by the user?)
So it sounds like you know the input elements are directly accessible - so the data is live there which youâll see change in the logs on every keystroke.
Now if you set a workflow on that element to trigger âon changeâ you can then action whatever youâd like such as your API save.
Be careful not to save it on literally every change otherwise youâll overload the server for one!
I would opt to set a âdelayâ of a few seconds as a second step to the on change event before firing the API call.
But if youâre looking for absolute realtime changes, you need to step into the world of the fairly new integration of Supabase Realtime which is designed for live chat etc.