Performing validation before changing tab #1562
Unanswered
turbosheep44
asked this question in
Help
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
So when the user tries to change the tab, I want to perform validation on some elements within the form and only change the tab if that validation returns
true
.I tried to use a combination of the
@change
event and theselected-index
prop, based on what is shown in the docs like below.However, doing this causes the tab to change normally and also causes the
selectedTab
value to fall out of sync with the actual value.Is it possible to do validation and then accept/reject the tag change from the event handler?
Beta Was this translation helpful? Give feedback.
All reactions