Confirmation modal on tab change #2116
-
Hey team, we have one use case where we want to have confirmation before tab change about discarding any unsaved user changes. Flow we expect:
useTabState does not give much flexibility to listen and prevent tab change. Please guide me here how to achieve this behaviour. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Hi @Joshi-Kajal, apologies for the slow response time. I'll be looking into this and getting back to you shortly. |
Beta Was this translation helpful? Give feedback.
-
Hi @Joshi-Kajal, I've managed to find a working solution by overwriting the |
Beta Was this translation helpful? Give feedback.
Hi @Joshi-Kajal,
I've managed to find a working solution by overwriting the
select
function generated by theuseTabState
hook. Let me know if you have any other questions or concerns with this approach.