Answers for "dot visible in paginition"

0

dot visible in paginition

indexChanged = (index) => {
    if (index === 2) {
        this.setState({ showPaginate: false });
    } else {
        this.setState({ showPaginate: true });
    }
}

render() {
    return (
        <Swiper
            loop={false}
            activeDotStyle={{ backgroundColor: 'transparent', borderWidth: 1, borderColor: '#fff' }}
            onIndexChanged={index => this.indexChanged(index)}
            showsPagination={this.state.showPaginate}
        >
            <View><Text>Section one</Text></View>

            <View><Text>Section two</Text></View>

            <View><Text>Section three</Text></View>
        </Swiper>
    );
}
Posted by: Guest on June-24-2020

Browse Popular Code Answers by Language