Skip to content

ScrollView: support for contentOffset prop #1273

Open

Description

@relign

when I use ScrollView work in Carousel Component. I need the prop. I want to know why not support?

Activity

  1. relign commented on Mar 5, 2019

    @relign
    Author

    image
    this prop...

  2. antonigiske commented on Jun 8, 2020

    @antonigiske

    Any news regarding this?

  3. relign commented on Jun 11, 2020

    @relign
    Author

    Any news regarding this?

    @necolas

  4. alexlevy0 commented on Dec 24, 2020

    @alexlevy0

    Please

  5. jackdewhurst commented on Feb 15, 2021

    @jackdewhurst

    For the time being I've gotten around this by using useEffect() on the scrollview ref and setting scrollTo without any animation on screen load.

    import React, { useEffect, useRef } from 'react'
    import { Text, ScrollView } from 'react-native'
    
    export default function ScrollViewTest(props) {
        const scrollView = useRef();
    
        useEffect(() => {
            scrollView.current.scrollTo({x: spacing, animated:false})
        }, [])
    
        return (
            <ScrollView ref={scrollView}>
                <Text>Testing...</Text>
            </Scrollview>
        )
    }
    
  6. added this to the 0.18 milestone on Mar 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions