Skip to content
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

Uncaught TypeError: Cannot read property 'setTargetNode' of undefined #85

Closed
GariaHarish opened this issue Aug 8, 2019 · 3 comments
Closed

Comments

@GariaHarish
Copy link

I am getting this issue when updating new version of "@coreui/react": "^2.0.8", 2.0.8 is working fine.
So apps breaking because of:
Warning: Failed context type: The context isOpen is marked as required in DropdownToggle, but its value is undefined.
in DropdownToggle
in li (created by Dropdown)
in Manager (created by Dropdown)
in Dropdown (created by AppHeaderDropdown)
in AppHeaderDropdown
Screenshot 2019-08-08 at 12 20 16 PM

@xidedix
Copy link
Member

xidedix commented Aug 8, 2019

Hi @Harish-singh33

in src/containers/DefaultLayout/DefaultHeader.js change

<AppHeaderDropdown direction="down">

to

<UncontrolledDropdown nav direction="down">

UncontrolledDropdown does not require isOpen nor toggle props to work.

@it-is-antonio
Copy link

it-is-antonio commented Jan 6, 2020

Hi,

I got the same problem and I fixed that by do not update react, so I use tilde ("~") instead of caret ("^" ) before the coreui/react version number.

e.g:

"@coreui/react": "^2.0.8" ->  "@coreui/react": "~2.0.8"

@sturm3nta
Copy link

sturm3nta commented Jan 28, 2020

I solved it thanks to this comment -> https://stackoverflow.com/a/57903640, updating the reactstrap version from "7.1.0" to "8.4.1"

"reactstrap": "^7.1.0" ->  "reactstrap": "^8.4.1"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants