I’m working on a small tool to manage some data. For this, I use the tabview to organize the different types of data. So for example, I have 3 tabs and each tab has their own fields with data that can be adjusted.
What I want to do is that if the user is changing some data in a tab and switches to another tab, I want to show a warning (popup) if there are still pending changes. The warning gives the option to discard the changes and move to the selected tab or to keep editing in the current tab.
I figured I could subscribe to the click events of the tabheader and stop propagation, but it seems to already have switched tabs before I can stop it.
Is this possible with the current implementation?
I also tried simply switching back to the “previous” tab by setting the selectedTabIndex, but that still actively changes tabs and considering I am doing some operations on tab open/close, I don’t want to do this.
I can probably also disable the other tabs the moment I have pending changes, but I would prefer the warning.