We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a4fec3c commit 6338fc3Copy full SHA for 6338fc3
src/Modal.js
@@ -13,6 +13,7 @@ import {
13
14
const propTypes = {
15
isOpen: PropTypes.bool,
16
+ autoFocus: PropTypes.bool,
17
size: PropTypes.string,
18
toggle: PropTypes.func,
19
keyboard: PropTypes.bool,
@@ -46,6 +47,7 @@ const propTypes = {
46
47
48
const defaultProps = {
49
isOpen: false,
50
+ autoFocus: true,
51
backdrop: true,
52
keyboard: true,
53
zIndex: 1050,
@@ -127,7 +129,9 @@ class Modal extends React.Component {
127
129
128
130
togglePortal() {
131
if (this.props.isOpen) {
- this._focus = true;
132
+ if (this.props.autoFocus) {
133
+ this._focus = true;
134
+ }
135
this.show();
136
if (!this.hasTransition()) {
137
this.onEnter();
0 commit comments