react-native-timeline-listview icon indicating copy to clipboard operation
react-native-timeline-listview copied to clipboard

Timeline not showing 'dots' when I have many elements on the list

Open Schwarzenegger opened this issue 7 years ago • 16 comments

I'm having this problem on my android/ios, when I create a timeline with more than 10 elements the 'dots' start not showing up

screenshot_2017-09-11-16-50-07

screenshot_2017-09-11-16-50-09

I've already tried setting up minWidth on timeContainerStyle

Schwarzenegger avatar Sep 11 '17 19:09 Schwarzenegger

@Schwarzenegger Have you figure it out? I've got the same issue as you were...

Hulva avatar Sep 14 '17 05:09 Hulva

@Schwarzenegger I've fixed it by overriderenderCircle

Hulva avatar Sep 14 '17 07:09 Hulva

@Hulva Yes, i figured it out by overiding renderCircle like you did.

Still messing it css to place the circle in the right place on all devices.

Schwarzenegger avatar Sep 14 '17 11:09 Schwarzenegger

@Schwarzenegger I've only played it on android... I didn't know that it'll display different on different device. Hope you'll find a good way to deal with it. Let me know if you do.

Hulva avatar Sep 15 '17 01:09 Hulva

I also have the same problem on ios devices.

linhanyang avatar Sep 28 '17 01:09 linhanyang

i have some problem with icon, someone resolved?

danielgarciasantos avatar Jan 04 '18 15:01 danielgarciasantos

Hi all.

Is it happen on emulator or real device?

thegamenicorus avatar Jan 04 '18 15:01 thegamenicorus

in both, debug...

danielgarciasantos avatar Jan 04 '18 17:01 danielgarciasantos

this problem is related to the initialListSize property, which by default is 10

danielgarciasantos avatar Jan 06 '18 00:01 danielgarciasantos

this problem is related to _renderCicle in circleStyle => left: this.state.x - (circleSize / 2) + ((lineWidth-1) / 2),

this.state.x may be zeroed due to _renderEvent's onLayout

onLayout Invoked on mount and layout changes with:

{nativeEvent: {layout: {x, y, width, height}}}

This event is fired immediately once the layout has been calculated, but the new layout may not be reflected on the screen at the time the event is received, especially if the layout animation is in progress.

danielgarciasantos avatar Jan 07 '18 21:01 danielgarciasantos

any solution for this ?

danielgarciasantos avatar Jan 12 '18 00:01 danielgarciasantos

@danielgarciasantos like I said, i overwrote renderCircle to look like this.

 renderCircle(rowData, sectionID, rowID) {
    var circleSize = 20
    var circleColor = rowData.circleColor
    var lineWidth = 2
    var ballPadding = (Platform.OS === 'ios') ? width/1.11 : width/1.10

    return (
       <View style={{
          width: 22,
           height: 22,
           borderRadius: 50,
           backgroundColor: circleColor,
           right: ballPadding
         }} />
     )
  } 

And the component

<Timeline
   style={timelineScreenStyle.list}
   data={this.state.data}
   timeContainerStyle={{minWidth:0}}
   detailContainerStyle={timelineScreenStyle.detailContainerStyle}
   separator={false}
   innerCircle={'none'}
   lineWidth={2}
   renderDetail={this.renderDetail}
   renderCircle={this.renderCircle}
   descriptionStyle={{color:'gray'}}
   enableEmptySections={true}
   options={{
     style:{paddingTop: 5}
    }}
    circleSize={22}
             />

It worked smooth for me on Android and IOs after this.

Schwarzenegger avatar Jan 12 '18 11:01 Schwarzenegger

overwrote renderCircle helped but circle position css is messed, its showing on the far right and line on the left. timeline

dsah avatar Feb 15 '18 00:02 dsah

gave up component?

danielgarciasantos avatar Feb 23 '18 18:02 danielgarciasantos

Have same problem and I can't do overwrite just like you. Any other solution for this ?

naklow12 avatar Sep 30 '18 08:09 naklow12

I am also facing issue while overriding renderCircle

bhaskardabhi avatar Jun 19 '19 12:06 bhaskardabhi