Skip to content

Commit 5c88f54

Browse files
authored
fix: dialog form scroll and submit (#1118)
1 parent c2b851c commit 5c88f54

File tree

1 file changed

+11
-11
lines changed
  • frontend/src/components/Board/Settings

1 file changed

+11
-11
lines changed

frontend/src/components/Board/Settings/index.tsx

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ import { colors } from '../Column/partials/OptionsMenu';
3333

3434
const DEFAULT_MAX_VOTES = 6;
3535

36-
const StyledForm = styled('form', { height: '100%' });
36+
const StyledForm = styled('form', { height: '100%', display: 'flex', flexDirection: 'column' });
3737

3838
type Props = {
3939
setIsOpen: Dispatch<SetStateAction<boolean>>;
@@ -293,13 +293,13 @@ const BoardSettings = ({
293293
};
294294

295295
return (
296-
<FormProvider {...methods}>
297-
<StyledForm
298-
onSubmit={methods.handleSubmit(({ title, maxVotes, formColumns }) => {
299-
updateBoard(title, maxVotes, formColumns);
300-
})}
301-
>
302-
<Dialog isOpen={isOpen} setIsOpen={setIsOpen}>
296+
<Dialog isOpen={isOpen} setIsOpen={setIsOpen}>
297+
<FormProvider {...methods}>
298+
<StyledForm
299+
onSubmit={methods.handleSubmit(({ title, maxVotes, formColumns }) => {
300+
updateBoard(title, maxVotes, formColumns);
301+
})}
302+
>
303303
<Dialog.Header title="Board Settings" />
304304
<ScrollableContent direction="column" justify="start" ref={scrollRef}>
305305
<Flex direction="column">
@@ -476,9 +476,9 @@ const BoardSettings = ({
476476
affirmativeLabel="Save"
477477
buttonRef={submitBtnRef}
478478
/>
479-
</Dialog>
480-
</StyledForm>
481-
</FormProvider>
479+
</StyledForm>
480+
</FormProvider>
481+
</Dialog>
482482
);
483483
};
484484

0 commit comments

Comments
 (0)