Skip to content

Commit c88a4e2

Browse files
authored
Merge pull request #774 from topcoder-platform/issue-771
onboading issues: Mobile UI issues + dropdown issues
2 parents 8c65d52 + 5ca92db commit c88a4e2

File tree

3 files changed

+16
-3
lines changed

3 files changed

+16
-3
lines changed

src/apps/onboarding/src/components/modal-add-work/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ const ModalAddWork: FC<ModalAddWorkProps> = (props: ModalAddWorkProps) => {
172172
dirty
173173
/>
174174
</div>
175-
<div className='d-flex gap-16 full-width'>
175+
<div className='d-flex gap-16 full-width flex-wrap'>
176176
<div
177177
className='flex-1'
178178
>

src/libs/ui/lib/components/form/form-groups/form-input/input-date-picker/InputDatePicker.tsx

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,14 @@ const InputDatePicker: FC<InputDatePickerProps> = (props: InputDatePickerProps)
106106
<DatePicker
107107
renderCustomHeader={renderCustomHeader}
108108
selected={props.date}
109-
onChange={props.onChange}
109+
onChange={(
110+
date: Date | null,
111+
event: React.SyntheticEvent<any> | undefined,
112+
) => {
113+
event?.stopPropagation()
114+
event?.preventDefault()
115+
props.onChange?.(date)
116+
}}
110117
placeholderText={props.placeholder || 'Select a date'}
111118
className={styles.datePickerWrapper}
112119
minDate={props.minDate}

src/libs/ui/lib/components/form/form-groups/form-input/input-select/InputSelect.tsx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import {
22
ChangeEvent,
33
Dispatch,
44
FC,
5+
MouseEvent,
56
MutableRefObject,
67
ReactNode,
78
SetStateAction,
@@ -49,7 +50,12 @@ const InputSelect: FC<InputSelectProps> = (props: InputSelectProps) => {
4950

5051
const toggleMenu: () => void = () => setMenuIsVisible(wasVisible => !wasVisible)
5152

52-
const select: (option: InputSelectOption) => () => void = (option: InputSelectOption) => () => {
53+
const select: (option: InputSelectOption) => (event: MouseEvent<HTMLDivElement>) => void
54+
= (option: InputSelectOption) => (
55+
event: MouseEvent<HTMLDivElement>,
56+
) => {
57+
event.stopPropagation()
58+
event.preventDefault()
5359
props.onChange({
5460
target: { value: option.value },
5561
} as unknown as ChangeEvent<HTMLInputElement>)

0 commit comments

Comments
 (0)