Skip to content

Commit 3e8e7ea

Browse files
arthur-FDtcbegley
andauthored
add enforceFocus property to the modal (#1001)
* add enforceFocus property to the modal * format --------- Co-authored-by: tcbegley <tomcbegley@gmail.com>
1 parent f8900f3 commit 3e8e7ea

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/components/modal/Modal.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ const Modal = props => {
1717
class_name,
1818
autoFocus,
1919
autofocus,
20+
enforceFocus,
2021
labelledBy,
2122
labelledby,
2223
modalClassName,
@@ -49,6 +50,7 @@ const Modal = props => {
4950
contentClassName={content_class_name || contentClassName}
5051
backdropClassName={backdrop_class_name || backdropClassName}
5152
autoFocus={autofocus || autoFocus}
53+
enforceFocus={enforceFocus}
5254
aria-labelledby={labelledby || labelledBy}
5355
show={is_open}
5456
onHide={onHide}
@@ -130,6 +132,11 @@ Modal.propTypes = {
130132
*/
131133
autoFocus: PropTypes.bool,
132134

135+
/**
136+
* When true The modal will prevent focus from leaving the Modal while open.
137+
*/
138+
enforceFocus: PropTypes.bool,
139+
133140
/**
134141
* Set the size of the modal. Options sm, lg, xl for small, large or extra
135142
* large sized modals, or leave undefined for default size.

0 commit comments

Comments
 (0)