Good day. There is a table with the goods. Each product has the ability to edit multiple fields. Data is saved via AJAX (for each product its own Save button).
There is also a navigation below. How to make it so that when you try to leave the page (close) or navigate through the navigation, you check whether the changes are saved in the product fields or not. If not, then issue a message.
I still see the next option. When changing the data fields of the goods recorded in a hidden input message (for example, 1) that the fields have undergone a change. And when saving, clear the value of this input. Thus, when navigating, I can do a check for filling such input-s.
But maybe there is a better solution?