avishain / react-native-range-slider-expo

Customizable range slider for react native apps
MIT License
29 stars 12 forks source link

ranger hesitate when use it inside component react-native-modals #24

Closed FatmaMahmoud698 closed 2 years ago

FatmaMahmoud698 commented 2 years ago

I had modal done by react-native-modals and need the ranger slider inside it but it not working fine sometimes working and other times not move

import { Modal, SlideAnimation } from 'react-native-modals';
import RangeSlider from 'react-native-range-slider-expo';
            <View>
                <Modal
                    visible={this.props.showModel}
                    modalAnimation={new SlideAnimation({
                        slideFrom: 'bottom',
                    })}
                    onTouchOutside={this.props.closeModal}
                    transparent={true}
                    style={{
                        backgroundColor: 'rgba(0, 0, 0, 0.69)',
                    }}
                    height={0.85}
                    width={0.95}
                >
                    <View>
                        </View>
                        <ScrollView style={[{ width: '90%', alignSelf: 'center' }]}>
                           // some component her 
                           <RangeSlider min={10000} max={1000000}
                        fromValueOnChange={value => console.log(value)}
                        toValueOnChange={value => console.log(value)}
                        initialFromValue={10000}
                        initialToValue={1000000}
                        styleSize={30}
                        fromKnobColor="#E95328"
                        toKnobColor="#E95328"
                        inRangeBarColor="#E95328"
                        step={1000}
                        showRangeLabels={false}
                        showValueLabels={false}
                    />
                        </ScrollView>
                    </View>
                </Modal>
            </View>

"react-native-modals": "^0.22.3", "react-native-range-slider-expo": "^1.4.0",

avishain commented 2 years ago

I know it might not be relevant anymore but in case it is - I made a small change that should hopefully fix this issue

FatmaMahmoud698 commented 2 years ago

@D10S60948 thanks for your response I am still facing the issue and searching for the solution I remove the package and install it again but still the same issue