React does not recognize the `basePath` prop on a DOM element
See original GitHub issueSimple form generates “React does not recognize the basePath prop on a DOM element”
Applying next change in node_modules (: ) fixes the error
export var FormInput = function (_a) {
// appending "basePath" fixes error
var classes = _a.classes, input = _a.input, rest = __rest(_a, ["classes", "input", "basePath"]);
console.log(rest)
var _b, _c;
return input ? (React.createElement("div", { className: classnames('ra-input', "ra-input-" + input.props.source, input.props.formClassName) }, input.props.addLabel ? (React.createElement(Labeled, __assign({ id: input.props.id || input.props.source }, input.props, sanitizeRestProps(rest)), React.cloneElement(input, __assign({ className: classnames((_b = {},
_b[classes.input] = !input.props.fullWidth,
_b), input.props.className), id: input.props.id || input.props.source }, rest)))) : (React.cloneElement(input, __assign({ className: classnames((_c = {},
_c[classes.input] = !input.props.fullWidth,
_c), input.props.className), id: input.props.id || input.props.source }, rest))))) : null;
};
Environment
- React-admin version: “ra-core” “2.8.6”,
- React version: “react” “16.8.6”,
- Browser: Chrome
- Stack trace (in case of a JS error):
index.js:1437 Warning: React does not recognize the `basePath` prop on a DOM element. If you intentionally want it to appear in the DOM as a custom attribute, spell it as lowercase `basepath` instead. If you accidentally passed it from a parent component, remove it from the DOM element.
in span (at form/index.js:73)
in div (created by FormInput)
in FormInput (created by WithStyles(FormInput))
in WithStyles(FormInput) (created by FormTab)
in span (created by FormTab)
in FormTab (created by Context.Consumer)
in translate(FormTab) (at form/index.js:29)
in Route (created by TabbedForm)
in div (created by CardContent)
in CardContent (created by WithStyles(CardContent))
in WithStyles(CardContent) (created by CardContentInner)
in CardContentInner (created by WithStyles(CardContentInner))
in WithStyles(CardContentInner) (created by TabbedForm)
in form (created by TabbedForm)
in TabbedForm (created by WithStyles(TabbedForm))
in WithStyles(TabbedForm) (created by Form(WithStyles(TabbedForm)))
in Form(WithStyles(TabbedForm)) (created by Connect(Form(WithStyles(TabbedForm))))
in Connect(Form(WithStyles(TabbedForm))) (created by ReduxForm)
in ReduxForm (created by Context.Consumer)
in translate(ReduxForm) (created by Connect(translate(ReduxForm)))
in Connect(translate(ReduxForm)) (created by Route)
in Route (created by withRouter(Connect(translate(ReduxForm))))
in withRouter(Connect(translate(ReduxForm))) (at form/index.js:28)
the value of basePath is the name of my resource
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:6 (4 by maintainers)
Top Results From Across the Web
React does not recognize the `basePath` prop on a DOM ...
Expected Behaviour: No warning of prop when Grid component is used inside SimpleForm component. Current Behaviour: Getting below warning.
Read more >How to fix the React does not recognize the `basePath ...
Warning : React does not recognize the basePath prop on a DOM element. If you intentionally want it to appear in the DOM...
Read more >Unknown Prop Warning - React
The unknown-prop warning will fire if you attempt to render a DOM element with a prop that is not recognized by React as...
Read more >warning: react does not recognize the prop on a dom element.
react does not recognize the basepath prop on a dom element. If you are trying to attach custom data to a standard DOM...
Read more >Warning: React does not recognize the `isOpen` prop on a DOM
prop on a DOM element. i got solved this issue. just change tag to Navlink because ActiveClassName is just suported Navlink.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

The
SimpleFormIteratoronly accepts Input elements as children. For your use case, you must create a new form iterator.There is no documentation on this subject yet. You’ll have to read the code of the SimpleFormIterator