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]: NavMenuButton: React does not recognize the innerRef prop on a DOM element. #421

Open
savutsang opened this issue Mar 22, 2022 · 0 comments
Labels
bug Something isn't working

Comments

@savutsang
Copy link
Contributor

savutsang commented Mar 22, 2022

Current behaviour

Big red warning message in console (the message appear only in development mode of react-dom).

react-dom.development.js:67 Warning: React does not recognize the `innerRef` prop on a DOM element. If you intentionally want it to appear in the DOM as a custom attribute, spell it as lowercase `innerref` instead. If you accidentally passed it from a parent component, remove it from the DOM element.

It does not break anything, but it's very annoying for the devs.

Expected behaviour

Not see the error

Steps to reproduce

<NavMenuButton options={[{ href: "/", value: "English" }]}>Test</NavMenuButton>

Context (version, environment, browser)

@equisoft/design-elements-react: 4.0.0
react: 17.0.2
react-dom: 17.0.2
NODE_ENV = development

Screenshots (optional)

The inspect element

<a data-testid="listitem-English-link" innerref="[object Object]" tabindex="0" aria-current="page" class="sc-bqiRlB bnKzLL active" href="/"><span class="sc-kDTinF AGqZw">English</span></a>

Additional details (optional)

Filter out innerRef when passing the props to the HTMLElement

@savutsang savutsang added the bug Something isn't working label Mar 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant