Skip to content

Commit

Permalink
fix: modal with form not scrollable
Browse files Browse the repository at this point in the history
When using the OpenCloseModal with onSave, the form inside the modal
content causes the modal not to be scrollable.

Fixed form layout to allow scrollable content.
  • Loading branch information
Gido Manders committed Sep 29, 2023
1 parent 714a4fa commit 86445cd
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/core/OpenCloseModal/OpenCloseModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ export function OpenCloseModal(props: Props) {
scrollable={stickyFooter}
>
{onSave ? (
<form onSubmit={onSave}>
<form onSubmit={onSave} className="d-flex flex-column overflow-hidden">
{header}
{body}
<ModalFooter className={modalFooterClassName}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@ exports[`Component: OpenCloseModal ui in progress 1`] = `
<div
class="modal-content"
>
<form>
<form
class="d-flex flex-column overflow-hidden"
>
<div
class="modal-header"
>
Expand Down Expand Up @@ -211,7 +213,9 @@ exports[`Component: OpenCloseModal ui open 1`] = `
<div
class="modal-content"
>
<form>
<form
class="d-flex flex-column overflow-hidden"
>
<div
class="modal-header"
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@ exports[`Component: DateTimeModal ui default 1`] = `
<div
class="modal-content"
>
<form>
<form
class="d-flex flex-column overflow-hidden"
>
<div
class="modal-body"
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -493,7 +493,9 @@ exports[`Component: DateTimeInput ui with date picker in modal 1`] = `
<div
class="modal-content"
>
<form>
<form
class="d-flex flex-column overflow-hidden"
>
<div
class="modal-header"
>
Expand Down

0 comments on commit 86445cd

Please sign in to comment.