Closed fornyatech closed 3 years ago
Hi @fornyatech, please check out #83 and let me know if it helps.
Although I just realized you are probably talking about a DraxList so that might not quite help. I’m posting from my phone at the moment and can’t look in more detail right now.
Take a look at this...
In a standard DraxView
, the prop animateSnapback
can be set to false
to disable the snapback animation: https://github.com/nuclearpasta/react-native-drax/blob/40c26004fca4dab87c8ac44c4462a3ef7ff8d0e2/src/types.ts#L246
In a DraxList
, the prop viewPropsExtractor
will allow you to specify a callback which returns partial props for the DraxView
s used in the list: https://github.com/nuclearpasta/react-native-drax/blob/40c26004fca4dab87c8ac44c4462a3ef7ff8d0e2/src/types.ts#L891
So using those together, I think you could have something like:
<DraxList
{...}
viewPropsExtractor={() => ({ animateSnapback: false })}
/>
I don't have time to test this myself right now, but give it a shot and see if you can get it working. Please update this thread with your results. Good luck!
Hello Sir, yes this worked for my usecase and the snapback animation was successfully removed post dropping the item. This is what I used:
<DraxList viewPropsExtractor={() => ({ animateSnapback: false })} />
This npm module is one of the best out there. Didn't find any issue with this module. Thanks a lot! :D
Hi, could you please help in identifying how can I remove the animation which comes post repositioning the item in a list