React-native-draggable-flatlist: critical bug

Created on 11 Dec 2018  路  9Comments  路  Source: computerjazz/react-native-draggable-flatlist

OS: Android 8.0
RN: 57.7
react-native-draggable-flatlist - latest
On drag, when the animation has not finished yet, but we have moved the element to the place where the animation ends.
Result: the item disappears.
Expected: normal behavior.
ezgif-3-761e3193f71f

It happens when spacerIndex and activeRow is equal.

Most helpful comment

Looking at a previous comment, i found that the issue can be fixed by getting line 398 like this:
horizontal ? { width: isActiveRow ? 1 : undefined } : { height: isActiveRow ? 1 : undefined },
I added a forceUpdate after my components onMoveEnd callback.
Can you check this solution?

All 9 comments

me too
anyone solve this?

I think if you add the code below, inside the onPanResponderRelease after const { activeRow, spacerIndex } = this.state; it will prevent this from happening. Could you confirm it?

if (activeRow == spacerIndex) {
          this.onReleaseAnimationEnd();
          return;
}

@eminsr No, It doesn't work.....

I have this problem too! :frowning_face:

Same thing here

Same thing here

@computerjazz we need your help :(

Looking at a previous comment, i found that the issue can be fixed by getting line 398 like this:
horizontal ? { width: isActiveRow ? 1 : undefined } : { height: isActiveRow ? 1 : undefined },
I added a forceUpdate after my components onMoveEnd callback.
Can you check this solution?

@galias11 WOW, ITS WORK! Thx!!! Are you f*ing god?!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

henriqueweiand picture henriqueweiand  路  5Comments

DavidFlores91 picture DavidFlores91  路  10Comments

gazedash picture gazedash  路  5Comments

exentrich picture exentrich  路  6Comments

jngcii picture jngcii  路  3Comments