Cannot read property 'itemHeight' of undefined
See original GitHub issueVersion
0.9.17
Environment
react-native 0.37.0
Reproduction link
https://mobile.ant.design/components/picker-cn/
Steps to reproduce
使用 Picker 组件,在安卓中必现。
报错在编译后的文件 NativePicker.android.js
第 84 行,this 是个 undefined
if (this.itemHeight !== height || this.itemWidth !== width) {
this.itemWidth = width;
this.refs.indicator.setNativeProps({
style: [styles.indicator, {
top: height * 3,
height: height,
width: width
}]
});
}
What is expected?
和 iOS 相同效果
What is actually happening?
安卓出错
使用的官方 demo
Issue Analytics
- State:
- Created 6 years ago
- Comments:5 (1 by maintainers)
Top Results From Across the Web
TypeError: Cannot read property 'item_name' of undefined
Chrome browser console shows error like Uncaught TypeError: Cannot read property 'newItem' of undefined I've noted my error lines as ...
Read more >Angular @ViewChild Error 'Cannot read property nativeElement of ...
I am new to Angular and facing this issue. I want to check value for variable elementRef if its empty before data shown...
Read more >[#QTBUG-31568] ComboBox / Menu: no scrolling available in the ...
... TypeError: Cannot read property 'height' of undefined After some ... error above doesn't appear readonly property int itemHeight: list.count > 0 ?...
Read more >Collection-repeat, cannot read property 'isLetter' of undefined - ionic ...
Hi there, I have been attempting to follow the 'collection-repeat' tutorial from this codepen, and I have copied the syntax exactly.
Read more >TypeError: Cannot read property 'height' of undefined
So sadly i have no idea when this error started. I've noticed i did an update with (YanFly's) - MV Plugin's., later this...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@cloudsafe @xwartz Sorry about this. please run
rm -rf node_modules && npm i
. Thanks@cloudsafe 用
NativePicker.ios.js
的代码替换了NativePicker.android.js
,使用 RN 默认的了