Skip to content

Commit

Permalink
add enforceFocus property to the modal (#1001)
Browse files Browse the repository at this point in the history
* add enforceFocus property to the modal

* format

---------

Co-authored-by: tcbegley <[email protected]>
  • Loading branch information
arthur-FD and tcbegley authored Feb 7, 2024
1 parent f8900f3 commit 3e8e7ea
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/components/modal/Modal.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ const Modal = props => {
class_name,
autoFocus,
autofocus,
enforceFocus,
labelledBy,
labelledby,
modalClassName,
Expand Down Expand Up @@ -49,6 +50,7 @@ const Modal = props => {
contentClassName={content_class_name || contentClassName}
backdropClassName={backdrop_class_name || backdropClassName}
autoFocus={autofocus || autoFocus}
enforceFocus={enforceFocus}
aria-labelledby={labelledby || labelledBy}
show={is_open}
onHide={onHide}
Expand Down Expand Up @@ -130,6 +132,11 @@ Modal.propTypes = {
*/
autoFocus: PropTypes.bool,

/**
* When true The modal will prevent focus from leaving the Modal while open.
*/
enforceFocus: PropTypes.bool,

/**
* Set the size of the modal. Options sm, lg, xl for small, large or extra
* large sized modals, or leave undefined for default size.
Expand Down

0 comments on commit 3e8e7ea

Please sign in to comment.