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

[BUG] - Tabs with prop destroyInactiveTabPanel error #4344

Open
stefnto opened this issue Dec 12, 2024 · 5 comments · May be fixed by #4491
Open

[BUG] - Tabs with prop destroyInactiveTabPanel error #4344

stefnto opened this issue Dec 12, 2024 · 5 comments · May be fixed by #4491
Assignees
Labels
📦 Scope : Components Related to the components 🐛 Type: Bug Something isn't working

Comments

@stefnto
Copy link

stefnto commented Dec 12, 2024

NextUI Version

2.6.8

Describe the bug

I want to reopen this issue #3972 that I made a while back, with the Tabs component having the destroyInactiveTabPanel={false} prop. The bug was closed labeled as fixed, so I updated NextUI to 2.6.8 but the same error still persists if the prop exists. Basically the error that I get when I open a page with that Tab component that has the destroyInactiveTablePanel prop set to false is this

Received an empty string for a boolean attribute `inert`. This will treat the attribute as if it were false. Either pass `false` to silence this warning, or pass `true` if you used an empty string in earlier versions of React to indicate this attribute is true.

The error message is not identical but it is similar. I tried with both react 18 and 19. Both versions show the same error.

Your Example Website or App

https://github.com/stefnto/typescript-project

Steps to Reproduce the Bug or Issue

Code is on app/page.tsx so you just navigate to localhost:3000 after opening the dev server

Expected behavior

This error shouldn't show.

Screenshots or Videos

No response

Operating System Version

Windows

Browser

Chrome

Copy link

linear bot commented Dec 12, 2024

@wingkwong wingkwong self-assigned this Dec 12, 2024
@wingkwong
Copy link
Member

preliminary findings:

  • applying the same code and version to a vite project. The error didn't show.
  • From the error message Received an empty string for a boolean attribute inert, it is expecting a boolean value which is a behaviour of react 19. However, the given repo is using 18.

@StephenPCG
Copy link

I have the same problem. My local installed component versions:

  • react: 19.0.0-rc-66855b96-20241106
  • @nextui-org/react: 2.6.8
  • @nextui-org/shared-utils: 2.1.1

I searched isReact19 in node_modules/, find it in this file node_modules/@nextui-org/shared-utils/dist/chunk-RFEIBVIG.mjs, it seems that, react version is embeded in this file, cased isReact19() always returns false.

@AnYiEE
Copy link
Contributor

AnYiEE commented Dec 27, 2024

Same issue. I am using Next.js 15, React 18, and NextUI 2.6.5. This issue does not seem to affect the build and usage, it only throws an error when running the development server.

@StephenPCG
Copy link

Same issue. I am using Next.js 15, React 18, and NextUI 2.6.5. This issue does not seem to affect the build and usage, it only throws an error when running the development server.

I'm also using Next.js 15, I tried to downgrade my React to 18 and find this problem persists. Then I found that when using nextjs' App Router, it always use bundled react (located node_modules/next/dist/compiled/react/) regardless of whatever version installed by user.

I searched nextjs documentation, found this https://nextjs.org/blog/next-15-1#react-19-stable :

Next.js 15.1 now fully supports React 19:
For the Pages Router: you can now use React 19 stable without needing the Release Candidate or Canary releases, alongside continued support for React 18.
For the App Router: we will continue to provide React Canary releases built-in. These include all the stable React 19 changes, as well as newer features being validated in frameworks, prior to a new React release.

@wingkwong wingkwong added 🐛 Type: Bug Something isn't working 📦 Scope : Components Related to the components labels Dec 28, 2024
@wingkwong wingkwong removed their assignment Jan 3, 2025
@wingkwong wingkwong linked a pull request Jan 18, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
📦 Scope : Components Related to the components 🐛 Type: Bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants