Answers for "reactstrap modal close on click outside"

0

bootstrap modal disable close on click outside react bootstrap

<div>
    <Modal show={this.state.show} onHide={this.handleClose} backdrop="static">
        <Modal.Header>
            <Modal.Title>Change Password</Modal.Title>
        </Modal.Header>
        <Modal.Body>
            <form className="form-horizontal" style={{margin:0}}>
                <div className='password-heading'>This is the first time you have logged in.</div>
                <div className='password-heading'>Please set a new password for your account.</div>
                <br/>

                <label className="password">Password
                    <input type={this.state.type} className="password__input" onChange={this.passwordStrength}/>
                    <span className="password__show" onClick={this.showHide}>{this.state.type === 'input' ? 'Hide' : 'Show'}</span>
                    <span className="password__strength" data-score={this.state.score}>
                        <div className="strength_string">{this.state.strength}</div>
                    </span>
                </label>
                <br/>
                <label className="password">Confirm Password
                    <input type={this.state.type} className="password__input" onChange={this.passwordStrength}/>
                </label>

            </form>
            <br/>
        </Modal.Body>
        <Modal.Footer>
            <Button onClick={this.submitPassword} disabled={this.state.isDisabled}>Submit</Button>
        </Modal.Footer>
    </Modal>
</div>
Posted by: Guest on July-25-2021
0

react native modal close when click outside

<Modal transparent={true} visible={alert} animationType='slide' onRequestClose={() => setalert(false)}>
	<TouchableOpacity activeOpacity={1} style={Styles.center} onPressOut={() => setalert(false)}>
		<TouchableWithoutFeedback>
            {/* Somethings */}
		</TouchableWithoutFeedback>
	</TouchableOpacity>
</Modal >

{/*TouchableOpacity close the modal when click and the TouchableWithoutFeedback block the touch inside the rectangle*/}
{/*Code take from: https://stackoverflow.com/questions/40483034/close-react-native-modal-by-clicking-on-overlay*/}
Posted by: Guest on June-06-2021

Code answers related to "reactstrap modal close on click outside"

Code answers related to "Javascript"

Browse Popular Code Answers by Language