You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I called asynchronous api and I got datas using title of PagerTitleIndicator prop.
and I called this.viewPager.setPage(initIdx) but it occurs above error.
So, I think it is asynchronous issue.
I got an error that message is 'undefined is not an object (evaluating curItemLayoutInfo.layout)'
_visibleDetect() method in PagerTtileIndicator
const { width, x: curItemOffsetX } = curItemLayoutInfo.layout;
I called asynchronous api and I got datas using title of PagerTitleIndicator prop.
and I called this.viewPager.setPage(initIdx) but it occurs above error.
So, I think it is asynchronous issue.
I hacked this issue.
state = {
trackScoll : false
}
<PagerTitleIndicator
...other props,
titles={this.state.asyncTitleDatas}
trackScroll={this.state.trackScroll}
/>
componentDidUpdate(prevProps, prevState) {
if (prevState !== this.states) {
var initPosition = this._findInitPosition(data);
this.viewPager.setPage(initPosition )
this.setState({trackScroll:true})
}
}
is it other solution?
The text was updated successfully, but these errors were encountered: