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.

Undefined is not an object (evaluating '_ref3.label')

See original GitHub issue

This error appears when I fill in a text field (not even selecting an option).

<DropDownPicker
          items={[
            {
              label: 'Cm',
              value: 'cm',
            },
            {
              label: 'Mm',
              value: 'mm',
            },
          ]}
          defaultValue={sizeUnit}
          containerStyle={styles.selectContainer}
          style={styles.select}
          itemStyle={{
            justifyContent: 'flex-start',
          }}
          dropDownStyle={styles.selectDropdown}
          onChangeItem={(item) => setRoom({sizeUnit: item.value})}
/>

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:12 (3 by maintainers)

github_iconTop GitHub Comments

4reactions
hossein-zarecommented, Oct 22, 2020

Hello, in defaultValue={sizeUnit} the sizeUnit is undefined or its value doesnt exist in the items. Make sure the variable is valid.

3reactions
hossein-zarecommented, Oct 26, 2020

@feraraujofilho Try const [country, setCountry] = useState('uk'); & …

onChangeItem={(item) => setCountry(item.value)}
Read more comments on GitHub >

github_iconTop Results From Across the Web

javascript - undefined is not an object(evaluating 'choice.label')
The choice.label error is a good hint that something is wrong with a label property being passed to DropDownPicker .
Read more >
receiving [TypeError: undefined is not an object (evaluating ...
I have a user input screen (AddTrack.js), in which I'm using the useState hook to capture input values. Have been trying to use...
Read more >
Undefined is not an object (evaluating 'f.postcount')
Hi,. I'm writing you because I have a page where I use the Ajax Load More plugin and I don't know if it's...
Read more >
ERROR TypeError: undefined is not an object (evaluating ...
ERROR TypeError: undefined is not an object (evaluating '_this.props.navigation.navigate') | How To Make Searchbar Flatlist Clickable & Navigate To Detail ...
Read more >
[Solved]-TypeError: undefined is not an object (evaluating '_ref ...
Coding example for the question TypeError: undefined is not an object (evaluating '_ref.navigation')-React Native.
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