Snacks icon indicating copy to clipboard operation
Snacks copied to clipboard

Error React does not recognize the `elementAttributes` prop on a DOM element when rending Select component

Open chrismanderson opened this issue 6 years ago • 1 comments

Getting in browser console

Warning: React does not recognize the `elementAttributes` prop on a DOM element. If you intentionally want it to appear in the DOM as a custom attribute, spell it as lowercase `elementattributes` instead. If you accidentally passed it from a parent component, remove it from the DOM element.
    in div (created by DropdownMenu)
    in div (created by DropdownMenu)
    in div (created by DropdownMenu)
    in DropdownMenu (created by Select)
    in div (created by Select)
    in div (created by Select)
    in Select (created by FormComponent)
    in FormComponent (created by withTheme(FormComponent))
    in withTheme(FormComponent) (created by StateHolder)
    in div (created by StateHolder)
    in div (created by StateHolder)
    in form (created by Form)
    in Form (created by StateHolder)
    in StateHolder (created by ReactExample)
    in div (created by StyleRoot)
    in StyleRoot (created by Wrapper)
    in Wrapper (created by ReactExample)
    in ReactExample

When rendering a Select component. Got this in my own app, then could recreate by cloning the repo and starting the styleguide via yarn styleguide.

chrismanderson avatar Nov 27 '18 18:11 chrismanderson

Go to the snacks.js file, (can be done by highlighting the "ic-snacks" import and hitting f12 in visual studio). Find all the "elementAttributes" and replace them with "elementattributes". Kills the error and the component still works as far as I can tell.

utb2017 avatar Sep 14 '19 03:09 utb2017