renato-bohler / redux-form-input-masks

Input masking with redux-form made easy
https://bohler.dev/redux-form-input-masks/
MIT License
138 stars 10 forks source link

Unrecognised `format` prop #98

Closed rdourado closed 4 years ago

rdourado commented 4 years ago

What are you reporting?

What is the current behavior?

React is not recognising format prop and is throwing a warning.

What is the expected behavior?

Get along with React and avoid any warnings.

Sandbox Link

What's your environment?

{
    "react": "^16.12.0",
    "react-dom": "^16.12.0",
    "react-redux": "^7.1.3",
    "redux": "^4.0.4",
    "redux-form": "^8.2.6",
    "redux-form-input-masks": "^2.0.1",
}

Other information

The following warning is being shown:

Warning: Invalid value for prop `format` on <input> tag. Either remove it from the element, or pass a string or number value to keep it in the DOM. For details, see https://fb.me/react-attribute-behavior
renato-bohler commented 4 years ago

Hey @rdourado. I was unable to reproduce this problem. On this sandbox, I'm using the exact same dependency versions and the "input" component.

The problem must be with the component that you are connecting to redux-form itself, as it may be forwarding unnecessary props to its children.

To help you, I would need more information and probably a sandbox. You can fork the sandbox I created.

I'm closing this for now, because it doesn't seem a problem with the library. Feel free to comment or reopen this issue.

rdourado commented 4 years ago

@renato-bohler You were right. I was spreading it on my custom input component instead of redux-form's Field component. My mistake. =)