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

Dynamic data loading does not work

Open XHTeng opened this issue 8 years ago • 9 comments

Which OS ?

iOS

Version

Which versions are you using:

  • react-native-swiper v? latest version
  • react-native v0.?.? ^0.52.0

the following is my JSON data : image

the following is my code: image

XHTeng avatar Jul 02 '18 03:07 XHTeng

me too

acezyf avatar Jul 03 '18 08:07 acezyf

Hi, Dynamic loading not working for me as well . but when I am making data static it's working fine. Is there any limitation of this tool on dynamic loading?

Example in https://github.com/leecade/react-native-swiper/blob/master/examples/components/Dynamic/index.js example doesn't seems to be working as well.

Team, I can also see there is not much activities on this plug-ins to address open issues(390+ open issues) as well, are you guys planning to continue support for his plug-in ?

shamca0633 avatar Jul 05 '18 14:07 shamca0633

Same problem here , dynamic data loading works fine on Android, but not on IOS. in my case I'm using a MAP function to load multiple Views into the swiper. On IOS the views are mounted on top of eachother

lucasboleli avatar Jul 11 '18 13:07 lucasboleli

I have solved this problem in the way mentioned in this link: issues#720

splsylp avatar Jul 21 '18 01:07 splsylp

I have used child components as each swipe page. // for eg // child components export default component1 Site extends Component { render(){ return <Text>Component1</Text> } }

// parent component (Having swiper) <Swiper ref={el => this.contentRef(el)} scrollEnabled={true} loop={false} showsButtons={false} showsPagination={false}
<Component1 /> <Component2 /> <Component3 /> <Component4 /> <Component5 /> </Swiper>

Now I have to show dynamic show/hide pages based on i had values like

  • showComponent1 == true
  • showComponent2 == false
  • showComponent3 == false
  • showComponent4 == true

when I applied it as following, <Swiper ref={el => this.contentRef(el)} scrollEnabled={true} loop={false} showsButtons={false} showsPagination={false}
{ showComponent1 && <Component1 />} { showComponent2 && <Component2 />} { showComponent3 && <Component3 />} { showComponent4 && <Component4 />} <Component5 /> </Swiper>

Problem:

  • It still display component2 and component3 in swiper. I cant use array or map for rendering pages in swiper because each are different components

ChandreshRana avatar Aug 13 '18 06:08 ChandreshRana

Same issue with me.

amalbose avatar Jun 09 '19 01:06 amalbose

same here

jonathanmachado avatar May 09 '20 13:05 jonathanmachado

same here

hengkx avatar Jul 07 '20 15:07 hengkx

Same here...its showing but pagination is not working and the app is closing abruptly. On android

elrapha avatar May 16 '21 08:05 elrapha