Skip to content

NumberInput incorrectly passes the shouldUnregister prop to some div element down the component tree #8651

Closed

Description

What you were expecting:
When using NumberInput with the shouldUnregister prop, no errors/warnings happen.

What happened instead:
When using NumberInput with the shouldUnregister prop, a warning is shown in the console:

Warning: React does not recognize the shouldUnregister prop on a DOM element. If you intentionally want it to appear in the DOM as a custom attribute, spell it as lowercase shouldunregister instead. If you accidentally passed it from a parent component, remove it from the DOM element.
div
...

Steps to reproduce:
Use a NumberInput and pass the shouldUnregister prop to it.

Related code:

Environment

React-admin version: 4.7.3
React version: 18.2.0

Browser: Firefox/Chrome

Remark: It should be basically the same problem as in this issue here: #8412
But SelectInput is using another sanitizing function for the rest props, so solving 8412 didn't solve this issue too.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions