Open wonderlul opened 1 year ago
PS. While we're at it - is it possible to programmatically disable layout animation on demand within JS? We have list of items with order that you can change not only with drag & drop. I would like to disable layout animation when doing drag & drop and enable doing other activity.
any soultion regarding this?
@moa-os
I did this patch (so basically just commented out the useEffect
). I'm sure it isn't optimal but I didn't have time to reflect on that at that time.
Same error here.
Commenting out the useEffect
on line 131 in node_modules/react-native-draggable-flatlist/src/components/CellRendererComponent.tsx
--as @wonderlul suggests does make the error go away, but at what cost I'm not sure.
My implementation is a NestableScrollView with a NestableDraggableList inside, where I'm triggering a list of items to be resorted programmatically, causing the itemLayoutAnimation
to fire.
This is my npx react-native info
:
System:
OS: macOS 13.5.1
CPU: (8) arm64 Apple M1
Memory: 293.70 MB / 16.00 GB
Shell:
version: "5.9"
path: /bin/zsh
Binaries:
Node:
version: 18.16.1
path: ~/.nvm/versions/node/v18.16.1/bin/node
Yarn:
version: 3.2.2
path: ~/.yarn/bin/yarn
npm:
version: 9.5.1
path: ~/.nvm/versions/node/v18.16.1/bin/npm
Watchman:
version: 2023.07.10.00
path: /opt/homebrew/bin/watchman
Managers:
CocoaPods:
version: 1.12.1
path: /Users/angusryer/.rvm/gems/ruby-2.7.5/bin/pod
SDKs:
iOS SDK:
Platforms:
- DriverKit 22.1
- iOS 16.1
- macOS 13.0
- tvOS 16.1
- watchOS 9.1
Android SDK:
Android NDK: 22.1.7171670
IDEs:
Android Studio: 2022.3 AI-223.8836.35.2231.10671973
Xcode:
version: 14.1/14B47b
path: /usr/bin/xcodebuild
Languages:
Java:
version: 11.0.19
path: /usr/bin/javac
Ruby:
version: 2.7.5
path: /Users/angusryer/.rvm/rubies/ruby-2.7.5/bin/ruby
npmPackages:
"@react-native-community/cli": Not Found
react:
installed: 18.2.0
wanted: 18.2.0
react-native:
installed: 0.72.4
wanted: 0.72.4
react-native-macos: Not Found
npmGlobalPackages:
"*react-native*": Not Found
Android:
hermesEnabled: true
newArchEnabled: false
iOS:
hermesEnabled: true
newArchEnabled: false
And my package.json versions:
"react-native-draggable-flatlist": "^4.0.1",
"react-native-reanimated": "^3.4.2",
"react-native-gesture-handler": "^2.12.1",
Any news on this issue?
Also seeing this error, any updates? Seems the comment below, found within CellRendererComponent, needs to be addressed?
// NOTE: Keep an eye on reanimated LayoutAnimation refactor: // https://github.com/software-mansion/react-native-reanimated/pull/3332/files // We might have to change the way we register/unregister LayouAnimations: // - get native module: https://github.com/software-mansion/react-native-reanimated/blob/cf59766460d05eb30357913455318d8a95909468/src/reanimated2/NativeReanimated/NativeReanimated.ts#L18 // - register layout animation for tag: https://github.com/software-mansion/react-native-reanimated/blob/cf59766460d05eb30357913455318d8a95909468/src/reanimated2/NativeReanimated/NativeReanimated.ts#L99
Describe the bug When I'm adding the flag
enableLayoutAnimationExperimental
I'm receiving this error:To Reproduce Here's how implementation looks like:
I've also tried with
animationConfig
but without results neither.Platform & Dependencies
Additional context If any other information is required, please inform. Have a good one everyone!