react-native-collapsible icon indicating copy to clipboard operation
react-native-collapsible copied to clipboard

Animation Glitch when used with CollapsedHeight

Open LucasKuhn opened this issue 4 years ago • 6 comments

It's quite hard to explain, but when there is a CollapsedHeight set, the expand animation sometimes glitches before continuing with the animation: Screen Recording 2020-11-15 at 5 23 58 PM (1)

It happens with both iOS and Android, tested on emulator and tested on my device.

Example Snack: https://snack.expo.io/8pLrDy!KA

To reproduce: Set CollapsedHeigth={{100}} and open it a few times, it happens every once in a while

LucasKuhn avatar Nov 15 '20 20:11 LucasKuhn

Also, tried using other Easing options, different durations and alignments. The glitch still happens in each one of those settings

LucasKuhn avatar Nov 15 '20 20:11 LucasKuhn

I have the same problem. Noticed that without hasKnownHeight checking in render method in Collapsible works fine with Collapsible. Didn't test with Accordion.

react native: 0.63.4 react native collapsible: 1.5.3

render() {
    ...
    const style = hasKnownHeight && {
        overflow: 'hidden',
        height: height,
    };
    ...
}

6justhero6 avatar Feb 22 '21 06:02 6justhero6

I'm having the same problem. I'm having a similar problem when using react-navigation-shared-element as well, the animation staggers and resizes. I think something else is the problem here. It would be great if someone knows what's happening here

TheGreatFellow avatar Jun 07 '21 09:06 TheGreatFellow

Have you been able to solve this problem? I am facing the same issue...

Mogul123 avatar Oct 20 '21 08:10 Mogul123

To me it looks like the height starts back at 0 for a frame before continuing from the set collapsedHeight. Edit: Looks like the same from https://github.com/oblador/react-native-collapsible/issues/218

davidchalifoux avatar Feb 17 '22 01:02 davidchalifoux