naoufal / react-native-accordion

An Accordion Component for React Native
https://www.npmjs.com/package/react-native-accordion
437 stars 101 forks source link

Not working with react native 0.36 #41

Open huyta opened 7 years ago

huyta commented 7 years ago

The content height of accordion is always zero

atlanteh commented 7 years ago

a quick fix is to add overflow: 'hidden' after line 111:

        <View
          ref="AccordionContentWrapper"
          style={{
            height: this.getTweeningValue('height'),
            overflow: 'scroll'
          }}
        >
compojoom commented 7 years ago

@atlanteh - thanks. That works for me as well on 0.38.rc.0

llitfkitfk commented 7 years ago

@atlanteh Note: Modify the Source Code (./node_modules/react-native-accordion/src/index.js)

laxxers commented 7 years ago

Modifying the source code doesn't sound like a good fix for this issue. Can someone please raise a PR to fix this?

atlanteh commented 7 years ago

@laxxers please see #42. I've copied the pr locally until this is solved

iuraya commented 7 years ago

The fix proposed by @atlanteh is not compatible with Android

atlanteh commented 7 years ago

Worked for me, both android & iOS.. Maybe your scenario is more complex which might introduce a bug? Can you try it on a very simple example page and see if it works for you.. Also maybe RN latest version broke something? Currently I'm on RN 41and it still seems to work..

apn-jun commented 7 years ago

not working on Android for RN 42 screenshot_20170310-140542

saumya commented 7 years ago

While the quick fix from @atlanteh works on iOS, anyone tried this on Android?! I am on RN-0.36.0.

compojoom commented 7 years ago

I have this working on RN 0.36 with android. @saumya

saumya commented 7 years ago

hi @compojoom thanks for the response. So this works in RN 0.36 on Android, with the quick fix or without the quick fix ? just asking because, if the quick fix is needed, then we have to fix it here for all of us.

atlanteh commented 7 years ago

Now I'm working with pull request #42 (copied locally). Seems to work on all the devices I used. both android and ios. my rn version is 41.2

compojoom commented 7 years ago

this branch has all the fixes I needed to have it work relatively ok on iOS and Android: https://github.com/compojoom/react-native-accordion/tree/compojoom-fixes

I'm currently using it with RN 0.36

saumya commented 7 years ago

Hi @atlanteh does that mean, once merged we will get this issue fixed? If yes, then when can we expect the merge? Thanks

atlanteh commented 7 years ago

Well it works for me.. But I'm not the owner of this repo.. So it's not my decision if to merge it or not

warent commented 7 years ago

Thanks @compojoom !

eggybot commented 6 years ago

I using the duplicate repo of @ercpereda and I found this problem in iOS when i have items in object in map/loop. the solution by @atlanteh works but how can I auto assign height on each loop item?

ercpereda commented 6 years ago

@eggybot I not understand your problem. Can you put some example?