Eugnis / react-native-timeline-flatlist

FlatList based timeline component for React Native for iOS and Android
https://www.npmjs.com/package/react-native-timeline-flatlist
MIT License
479 stars 69 forks source link

Type {removeClippedSubviews: false;} is missing the following properties from type FlatListProps<Data> #91

Open abdullah-tsx opened 3 weeks ago

abdullah-tsx commented 3 weeks ago

Passing options gives TS error.

<Timeline
  isUsingFlatlist={true} // Ensures FlatList is used internally
  data={shipmentTrackingData} // Your shipment data
  circleSize={15}
  showTime={false}
  lineColor="rgba(0,0,0,0.2)"
  circleColor="#f89e34"
  columnFormat="single-column-left"
  eventDetailStyle={{
    marginTop: -10,
    marginBottom: 10,
  }}
  options={{
    removeClippedSubviews: false, // Disables clipping behavior
  }}
  renderDetail={(rowData) => {
    const time = (
      <Text className="mb-2 font-light text-xs italic">{rowData.time}</Text>
    );
    const title = <Text style={{ fontWeight: "bold" }}>{rowData.title}</Text>;
    const desc = rowData.description ? (
      <Text>{rowData.description}</Text>
    ) : null;
    return (
      <View style={{ flex: 1 }}>
        {time}
        {title}
        {desc}
      </View>
    );
  }}
/>;
aswinsam commented 2 weeks ago

I am facing the same issue with options={{ onEndReached: onEndReached }} which is an options provided in the npm package readme itself, all I did was use typescript.