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

Closing a modal with no tabs in TabList results in an error #130

Open
kennethbruskiewicz opened this issue Sep 13, 2019 · 0 comments · May be fixed by #131
Open

Closing a modal with no tabs in TabList results in an error #130

kennethbruskiewicz opened this issue Sep 13, 2019 · 0 comments · May be fixed by #131

Comments

@kennethbruskiewicz
Copy link

When I attempt to close the Modal and there are no tabs open, because the user closes all tabs they have from the Modal, I get a TypeError: tab is undefined and the relevant stack being:

getTabNode
scrollToIndex
toggleModal

I know that this isn't a typical case because generally we disallow tabs to be closable if there is just one, but in my case I need to allow all tabs to be closable from any point in this component's use.

Otherwise, great component, saved my skin. 👍

@kennethbruskiewicz kennethbruskiewicz changed the title Closing a modal with no tabs results in an error Closing a modal with no tabs in TabList results in an error Sep 13, 2019
stefanuros added a commit to stefanuros/react-tabtab that referenced this issue Oct 30, 2019
@stefanuros stefanuros linked a pull request Oct 30, 2019 that will close this issue
matAlmeida pushed a commit to 4DevsO/react-tabtab that referenced this issue Oct 19, 2020
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

Successfully merging a pull request may close this issue.

1 participant