react-native-sortable-listview icon indicating copy to clipboard operation
react-native-sortable-listview copied to clipboard

Undefined is not an object (evaluating 'wrapperLayout.pageY'))

Open brunoczo opened this issue 7 years ago • 8 comments

unnamed 1

I'm getting this error in IOS, does anyone know what it can be? No Android is working properly.

Edit: My workaround is edit the node_modules/react-native-sortable-listview/index.js and add the (wrapperLaoyout==null?0:wrapperLaoyout.pageY) in 3 pointis of my code

brunoczo avatar Dec 28 '17 22:12 brunoczo

I also get this error on ios seems to happen when the drag is not completed properly.

aidan-doherty avatar Jan 05 '18 11:01 aidan-doherty

hard to replicate in ios simulator but happens on iphone 6 device seems the scrolling on the list and drag is conflicting @brunoczo your workaround does fix the error page displaying but it never retrieves the correct scroll offset with wrapperLayout as it is always set to 0.

aidan-doherty avatar Jan 05 '18 12:01 aidan-doherty

I have the save prolem , how to solve this prolem ?

zbz1366 avatar Apr 03 '18 00:04 zbz1366

Anyone successfully fix this? Facing this same issue

adamjacob avatar Apr 12 '18 00:04 adamjacob

I will check if I can fix that this week

nihgwu avatar Apr 12 '18 05:04 nihgwu

Commenting out the InteractionManager here (https://github.com/deanmcpherson/react-native-sortable-listview/blob/master/index.js#L458-L460) fix it for me. Not sure if it's something that I'm doing in my application but InteractionManager.runAfterInteractions was never triggering so the layout was never getting measured.

adamjacob avatar Apr 12 '18 15:04 adamjacob

@adamjacob You mean

componentDidMount() {
    // InteractionManager.runAfterInteractions(() => {
      this.timer = setTimeout(() => this && this.measureWrapper(), 0)
    // })
  }

Right? For me, it also work. Thank you.

kasajei avatar Jul 21 '18 13:07 kasajei

I have this issue only on android

this.refs.wrapper.measure

Always return undefined...

LucasYver avatar Jun 21 '19 09:06 LucasYver