File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -124,6 +124,22 @@ var App = React.createClass({
124
124
ReactDOM .render (< App/ > , appElement);
125
125
```
126
126
127
+ By default the modal is closed when clicking outside of it (the overlay area). If you want to prevent this behavior you can
128
+ pass the 'shouldCloseOnOverlayClick' prop with 'false' value.
129
+ ``` xml
130
+ <Modal
131
+ isOpen ={bool}
132
+ onRequestClose ={fn}
133
+ closeTimeoutMS ={n}
134
+ shouldCloseOnOverlayClick ={false}
135
+ style ={customStyle}>
136
+
137
+ <h1 >Force Modal</h1 >
138
+ <p >Modal cannot be closed when clickig the overlay area</p >
139
+ <button onClick ={handleCloseFunc}>Close Modal...</button >
140
+ </Modal >
141
+ ```
142
+
127
143
# Demos
128
144
* http://reactjs.github.io/react-modal/
129
145
* http://reactjs.github.io/react-modal/bootstrap
You can’t perform that action at this time.
0 commit comments