Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[HELP] Prevent tab change #32

Open
emp-sean opened this issue Mar 9, 2023 · 2 comments
Open

[HELP] Prevent tab change #32

emp-sean opened this issue Mar 9, 2023 · 2 comments

Comments

@emp-sean
Copy link

emp-sean commented Mar 9, 2023

Hi there, is there a way to prevent the tab change if there are conditions not met.

I.e. I'm trying to use the onTabBeforeChange event to check parameters and prevent the change, but nothing I try appears to work.

const onTabBeforeChange = (index, oldIndex) => {
    switch (currentTabIndex)
    {
        case 0:
            if (selectedUtility.value == undefined && selectedBuilding.value == undefined)
                //Prevent the change

            break;
    }
};

Thanks.

@bels
Copy link

bels commented Mar 16, 2023

I am also looking for this kind of functionality. Let me know if you find anything out.

@julix14
Copy link

julix14 commented Mar 30, 2023

I don't know an exact solution for your approach. In my project i faced a similar problem and i wanted that the user can only continue the wizard if a condition was met.
So, i enable and disable the continue button dynamically. How this could work is mentioned in this issue #31

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants