-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Picker : undefined is not an object :child.props.value #983
Comments
+1 |
I guess that will happen in the following cases: A) rendering just one
B) rendering one and an array of items
C) not returning element in callback
|
@horiuchie so this is a bug! |
I agree. |
@horiuchie Thanks , I make it by using C) not using the brackets and puting the Item0 in the array |
This appears to be a fairly strong limitation. We want to have a dropdown that must be selected, meaning when it starts it says "Select a value..." In Android, the "placeholder" property is not supported on Native Base so we have to include this item at the top of the list; however because of the limitation in this issue that is impossible. Currently we have no workaround for this. |
NativeBase picker for android is a direct implementation of react-native's picker. Since React Native Picker doesn't have this yet, there is no way of doing this as of now. |
@shivrajkumar This does appear to be a NativeBase bug - this type of example from @horiuchie
|
Hi @lukecwilliams, this is our implementation of the picker. Are we missing something here? |
That looks pretty straightforward. This code without the first NBPicker.Item works for us, but with the first NBPicker.Item breaks. I'm not sure why @horiuchie indicated this situation should break - I'm not aware of why that would be the case, but it does break for us. Sorry I can't be of more help. Unfortunately, in RN we get a generic "shadowView super (of ID 76) not found" error that doesn't help us debug.
|
We are running into the same problem here, while simply using map:
Anyone found a solution yet? |
We found the solution... the bug is quite incredible really. We are using ImmutableJS for our redux state. The (ugly) solution is thus: |
Recently I've faced the same issue, This might be a less ugly solution
|
Any update? |
any updates ? |
any update here? |
Fixed with 2.7.1 |
Facing same issue...
|
@ap050492 the map function misses return statement. Change this
to
or
|
Thanks @akhil-geekyants for the solution, the last one worked great for me. Was missing the return |
After upgrade from version 2.12.2 to 2.13.4 I've this issues. My code is like this format:
|
Same issue with 2.13.4, only on iOS in my case, Android works fine. |
Why is this closed I'm still facing the same issue here |
I'm using expo: 38, and native-base: 2.13.13 |
I was also getting the same error and the issue in my code was that I was rendering a |
Going to add this here. Not sure if this will answer it for anyone, but it seemed to work for some people. |
I am trying to return Picker.Item from an array but I face the following error:
undefined is not an object :child.props.value
<Picker style={{ paddingLeft: 100, width:(Platform.OS === 'ios') ? undefined : 120 }}
iosHeader="Selecy"
mode="dropdown"
selectedValue="0"
inLineLabel={true}>
<Picker.Item label="Item 0" value="0" />
{this.props.ItemList.map((member,key)=>{
<Picker.Item label={member.props} value={member.value} />
})
}
</Picker>
The text was updated successfully, but these errors were encountered: