React_Native Modal is closing while Navigation between two screens

238 Views Asked by At

Hello i am new in react native...! I m using Modal inside i m showing some texting when i go next screen and coming back my Modal screen Modal is auto closing...! i dont want Modal closing when i back on Modal screen ! can anyone help me

   this.state.rbsheet === true  ?
                <Modal
                    animationType="slide"
                    transparent={true}
                    visible={this.state.rbsheet}
                   >
                 <View style={Constants.NewmaiView}>
                                    
                                    <View style={{ flex: 0.5 }}>
                                        <Pressable onPress={() => this.props.navigation.push("AddTicketSelectValuesScreen",
                                            {
                                                APIName: "assetcodelisting.php",
                                                HeaderTitle: 'Select Asset Code/SN',
                                                onNavigateBack: (Id, Value, setAssetLabel) => this.refresh(Id, Value, setAssetLabel),
                                                Label: "setAssetLabel",
                                            })}>
                                            <View style={[Constants.SectionStyle, Constants.NewInputStyle]}>
                                                <TextInput
                                                    style={[Constants.fontStyle500, { width: "100%" }]}
                                                    placeholder="Type and Search Assets Code"
                                                    editable={false}
                                                    value={this.state.setAssetLabel}
                                                    placeholderTextColor="grey"
                                                />
                                                
                                            </View>
                                        </Pressable>
                                    </View>
                                </View>  
                           </Modal> : null

i called this.refresh fucntion for naviagate..! can you do someting....

0

There are 0 best solutions below