-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Warning: React does not recognize the iconPosition
prop on a DOM element. (v10.8.3)
#7219
Comments
Looks like the <div {...rootProps} ref={elementRef}>
{Children.map(props.children, (child, index) =>
cloneElement(child, {
iconPosition: props.iconPosition
})
)}
</div> |
To let you know, I used IconField without autocomplete and I also have the bug. |
+1 |
+1 my team and I are encountering this bug as well. We were using v10.7.0 and updated to v10.8.3 and both versions have the issue, which makes me think it was not this commit 2bc9397 from @gcko. If someone can provide some points on how to proceed I'm happy to take a stab at fixing the issue and opening a PR. |
Well as i stated the code is right here: primereact/components/lib/iconfield/IconField.js Lines 30 to 40 in 3dec07f
Its blindly putting that field on ANY child not checking that its of a certain type. |
@melloware I don't follow. We were also getting the error message while using v10.7.0, which was before the commit in August that introduced that code, which suggests that that snippet is not the culprit. |
That code is only in two places |
Describe the bug
React does not recognize the
iconPosition
prop on a DOM element wheniconPosition
prop inIconField
is used withAutoComplete
component.Reproducer
https://stackblitz.com/edit/vitejs-vite-o12afk
System Information
Steps to reproduce the behavior
Expected behavior
AutoComplete and IconField are not composable. We should be able to combine any React component with any other component seamlessly.
The text was updated successfully, but these errors were encountered: