-
-
Notifications
You must be signed in to change notification settings - Fork 446
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
Disable warning for TabPanel count of 0 #329
Comments
- With this commit, tabs can be used without panels. - If usePanel is given false, the error that occurs when there are no panels is not printed in console. - usePanel default value is true. - this commit does not cause any breaking change reactjs#329
- With this commit, tabs can be used without panels. - If usePanel is given false, the error that occurs when there are no panels is not printed in console. - usePanel default value is true. - this commit does not cause any breaking change reactjs#329
This would add more surface to the API, only to support a use case that was obviously not intended to be supported. (And in my personal opinion does not make sense.) As an alternative, maybe we should allow the use of Although, to be honest, I don't see a meaningful advantage over adding your desired behaviour to |
It sure would add more surface to the API, so the concern of whether it adds value makes sense. The value in my case - and also it seems on the issue you linked - does not come from instantiating a bunch of
If all the UX logic was exported as a set of react hooks, then yes I would have a bunch of |
Hello,
I am using react-tabs with with success in my app.
In some places though, I use it with no panel at all. In that case, it is used to change a property on another component.
Stripped down example to illustrate:
This works perfectly.
However, react-tabs complains that
It then continues happily and everything works fine.
TabPanel
s is exactly 0?The text was updated successfully, but these errors were encountered: