question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cannot read property 'outsideClickIgnoreClass' of undefined

See original GitHub issue

Hi guys,

Firstly, thanks for a great date picker!

Everything has been working for a while, but after updating to meteor’s latest stable version (1.3) I can’t get it working again. I realise this could be a meteor issue so feel free to send me in that direction if it’s clearly not a problem here.

The Problem The component mounts fine and opens correctly on focusing the input, but when clicking outside the calendar to close it, I get the error “Cannot read property ‘outsideClickIgnoreClass’ of undefined”. After looking into what’s going on, it looks like the react-onclickoutside mixin is getting the wrong context somewhere along the line

var fn = this.__outsideClickHandler = (function(localNode, eventHandler) { 
  return function(evt) {
    evt.stopPropagation();
    var source = evt.target;
    var found = false;
    // this.props is undefined here, and 'this' is the document for some reason
    var ignoreClass = this.props.outsideClickIgnoreClass || IGNORE_CLASS;

Has anyone experienced this? Or is this possibly a meteor build issue?

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:11

github_iconTop GitHub Comments

2reactions
rafeememoncommented, Mar 30, 2016

@tjcampbell, @janroesner, @andynoelker, the fix is merged, let us know if that fixes the issue for you

1reaction
rafeememoncommented, Mar 31, 2016

The new release of react-onclickoutside will be pulled in automatically if you reinstall

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cannot read properties of undefined (React) - Stack Overflow
I've been trying for about two days to find the problem but can't find it. This is the error message : Uncaught TypeError:...
Read more >
How to Read React Errors (fix 'Cannot read property of ...
Got an error like this in your React component? Cannot read property `map` of undefined. In this post we'll talk about how to...
Read more >
Use ES6 Arrow Functions to Resolve "TypeError - Pluralsight
1TypeError : Cannot read property '<your property name>' of undefined. If you run into this error while writing React, the odds are high...
Read more >
React TypeError: Cannot read property 'props' of undefined
The "Cannot read property 'props' of undefined" error occurs when a class method is called without having the correct context bound to the...
Read more >
Can Not Read Properties of Undefined Reading Map in React ...
If you are looking at can not read properties of undefined reading map in react js error or map function is not displaying...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found