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.

TypeError when changing dropdown before data is given

See original GitHub issue

On first load, we pass in an empty array. Once we load the data (with the click of a button), it then gets a populated array. This works fine. However, if you change the items-per-page dropdown, and then load the data in, we get a type error. I briefly stepped through the code and saw that the error is being thrown here, where data is undefined. on line 55, this.props.data is an array of undefined items

Many thanks.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
AllenFangcommented, Mar 27, 2017

thanks, I’ll also try to reproduce it, but need some time, there’re a lots of issue was queued

0reactions
Billy-commented, Mar 30, 2017

Awesome, that was quick! Thanks so much, will try it out tomorrow

Read more comments on GitHub >

github_iconTop Results From Across the Web

Uncaught TypeError: Cannot read property 'setAttribute' of ...
We tried removing data-toggle="dropdown" from the <select> tag; the error no longer occurred, and the dropdown menu still functioned.
Read more >
SCR19: Using an onchange event on a select element ... - W3C
The objective of this technique is to demonstrate how to correctly use an onchange event with a select element to update other elements...
Read more >
What's new in 1.3.0 (July 2, 2021) - Pandas
This behavior is deprecated. In a future version, the TypeError will be raised, and users will need to select only valid columns before...
Read more >
Dropdowns · Bootstrap v5.1
Overview. Dropdowns are toggleable, contextual overlays for displaying lists of links and more. They're made interactive with the included Bootstrap ...
Read more >
Cannot Read Property of Undefined in JavaScript - Rollbar
What Causes TypeError: Cannot Read Property of Undefined. Undefined means that a variable has been declared but has not been assigned a value....
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