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.

Error to select an item

See original GitHub issue

When I select one the first values that can I see in the list, Its works fine but when I search other item and I click, I have an error.

The error is: undefined is not an object (evaluating ‘item.value’)

  • app/screens/ArticleList.js:240:43 in ArticleModal
  • [native code]:null in find

I’m putting a console log into the function and the value arrive well.

This is my component:

<DropDownPicker
                        items = {
                            products
                        }
                        defaultValue = { article.articleName }
                        containerStyle = {{height: 40}}
                        style = {{backgroundColor: '#fafafa'}}
                        dropDownStyle = {{backgroundColor: '#fafafa'}}
                        onChangeItem = {item => onChangeSetArticle(item.value, 'articleName') }
                        searchable = { true }
                        searchablePlaceholder = "Buscar artículo..."
                        searchableError = "Artículo no encontrado"
                        placeholder = "Selecciona un artículo"
                    />

const onChangeSetArticle = (e, type) => {
            return setArticle({
                ...article, 
                [type]: e
            })
    }

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
MatiasChaocommented, Jul 3, 2020

Hello!

I found the problem.

I have a very long array with a lot of products and I had a “,”

const products = [ { label: ‘Uno’, value: ‘Uno’ }, { label: ‘Dos’, value: ‘Dos’ }, { label: ‘Tres’, value: ‘Tres’ }, { label: ‘Cuatro’, value: ‘Cuatro’ }, < for example… { label: ‘Cinco’, value: ‘Cinco’ } ]

Really thanks so much for helping me!!! Greetings 😃

1reaction
hossein-zarecommented, Jul 3, 2020

Please create an Expo Snack and reproduce the behavior, I’ll find out what’s going wrong, https://snack.expo.io/

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cannot select item. It was not found among existing items. TIP ...
Hi @Sanjit_Pal, Run it in debug mode and check if there is data you want to enter in the listbox.
Read more >
Error when selecting an item from a dropdown menu/picklist
This happens when the Value field for a pick list associated with a field is not unique, and two (or more) records are...
Read more >
flutter - Error selecting a specific item in DropDownMenuItem
I just checked I have 21 list of strings which display properly but only one item is giving bugs when selected this item...
Read more >
Error While Submitting Contract From Award - Oracle Support
Error While Submitting Contract From Award - To Select An Item, You Must Select An Item Master. (OKC-195919) (Doc ID 2664788.1).
Read more >
Error Occur when trying to select Item List - SAP Community
Hi Experts,. Machine gets Hang when trying to select Item List in row level PO,SO ect as well as in item master Data...
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