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

React does not recognize the breadCrumbs prop on a DOM element. PageContainer #4184

Closed
alfi-dim opened this issue Oct 4, 2024 · 3 comments · Fixed by #4189
Closed

React does not recognize the breadCrumbs prop on a DOM element. PageContainer #4184

alfi-dim opened this issue Oct 4, 2024 · 3 comments · Fixed by #4189
Labels
bug 🐛 Something doesn't work component: PageContainer scope: toolpad-core Abbreviated to "core"

Comments

@alfi-dim
Copy link

alfi-dim commented Oct 4, 2024

Steps to reproduce

Link to live example: (required)

Steps:

  1. Create custom content wrapper using PageContainer
  2. Adding "breadcrumbs" on PageContainer as "breadcrumbs" props is not work, but it works when adding as "breadCrumbs" props but got warning

Current behavior

Image

Expected behavior

it should not give warning when adding breadCrumbs props, or if it really using breadcrumbs is the right way, it should render the breadcrumbs

Context

the code

export default function ContentWrapper({ pageProps, centered, children }) {
  const { title, breadcrumbs } = pageProps;

  const classNames= `flex flex-col ${centered ? 'items-center' : ''} gap-2 border-t pt-2 border-t-gray-400`
  return (
    <PageContainer
      title={title}
      breadCrumbs={breadcrumbs}
    >
      <section className={classNames}>
        {children}
      </section>
    </PageContainer>
  )
}

page when add breadCrumbs props
Image

page when add breadcrumbs props
Image

in case you wonder what that error box on nextjs looks like
Image
Image

Your environment

npx @mui/envinfo
    System:
    OS: Windows 11 10.0.22631
  Binaries:
    Node: 18.20.4 - C:\Program Files\nodejs\node.EXE
    npm: 10.7.0 - C:\Program Files\nodejs\npm.CMD
    pnpm: Not Found
  Browsers:
    Chrome: Not Found
    Edge: Chromium (129.0.2792.52) (MS Edge Version 129.0.2792.65 (Official build) (64-bit))
  npmPackages:
    @emotion/react:  11.13.3
    @emotion/styled: ^11.13.0 => 11.13.0
    @mui/base:  5.0.0-beta.58
    @mui/core-downloads-tracker:  6.1.1
    @mui/icons-material: ^6.1.1 => 6.1.1
    @mui/lab: ^6.0.0-beta.10 => 6.0.0-beta.10
    @mui/material: ^6.1.1 => 6.1.1
    @mui/material-nextjs: ^6.1.1 => 6.1.1
    @mui/private-theming:  6.1.1
    @mui/styled-engine:  6.1.1
    @mui/system:  6.1.1
    @mui/types:  7.2.17
    @mui/utils:  6.1.1
    @mui/x-data-grid: ^7.18.0 => 7.18.0
    @mui/x-internals:  7.18.0
    @toolpad/core: ^0.7.0 => 0.7.0
    @toolpad/utils:  0.7.0
    @types/react:  18.3.10
    react: ^18 => 18.3.1
    react-dom: ^18 => 18.3.1
    typescript:  5.6.2

Search keywords: pagecontainer

@alfi-dim alfi-dim added the status: waiting for maintainer These issues haven't been looked at yet by a maintainer label Oct 4, 2024
@Janpot
Copy link
Member

Janpot commented Oct 4, 2024

@alfi-dim That reproduction links to a preview, can you share the actual codesandbox so that I can inspect the code?

Ok, I could reproduce, thank you for reporting. Fixing it in #4189. Just a heads up that we're going to rename this property to breadcrumbs (lowercase c) for more consistent naming between MUI libraries.

@Janpot Janpot added bug 🐛 Something doesn't work component: PageContainer scope: toolpad-core Abbreviated to "core" and removed status: waiting for maintainer These issues haven't been looked at yet by a maintainer labels Oct 5, 2024
@alfi-dim
Copy link
Author

alfi-dim commented Oct 5, 2024

Alright thanks, I'll update to you later to see if the issue is still persist.

Have a nice day.

@alfi-dim alfi-dim closed this as completed Oct 5, 2024
Copy link

github-actions bot commented Oct 5, 2024

This issue has been closed. If you have a similar problem but not exactly the same, please open a new issue.
Now, if you have additional information related to this issue or things that could help future readers, feel free to leave a comment.

Note

We value your feedback @alfi-dim! How was your experience with our support team?
We'd love to hear your thoughts in this brief Support Satisfaction survey. Your insights help us improve!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something doesn't work component: PageContainer scope: toolpad-core Abbreviated to "core"
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants