Skip to content

Commit 29dd930

Browse files
committed
fix: remove menuPosition fixed in date time picker and time select
1 parent deee00d commit 29dd930

File tree

2 files changed

+14
-24
lines changed

2 files changed

+14
-24
lines changed

src/Shared/Components/DatePicker/DateTimePicker.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,6 @@ const DateTimePicker = ({
110110
onChange={handleTimeChange}
111111
data-testid={dataTestIdForTime}
112112
menuSize={ComponentSizeType.xs}
113-
menuPosition="fixed"
114113
size={ComponentSizeType.large}
115114
shouldMenuAlignRight
116115
/>

src/Shared/Components/DatePicker/TimeSelect.tsx

Lines changed: 14 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
* limitations under the License.
1515
*/
1616

17-
import { ReactComponent as ErrorIcon } from '@Icons/ic-warning.svg'
1817
import { ReactComponent as ClockIcon } from '@Icons/ic-clock.svg'
1918
import { ComponentSizeType } from '@Shared/constants'
2019
import { DEFAULT_TIME_OPTIONS } from './utils'
@@ -29,26 +28,18 @@ export const TimePickerSelect = ({
2928
error,
3029
selectedTimeOption,
3130
}: TimeSelectProps) => (
32-
<>
33-
<SelectPicker
34-
inputId={DATE_PICKER_IDS.TIME}
35-
placeholder="12:00 AM"
36-
options={DEFAULT_TIME_OPTIONS}
37-
isSearchable={false}
38-
isDisabled={disabled}
39-
{...timePickerProps}
40-
value={selectedTimeOption}
41-
icon={<ClockIcon className="icon-dim-20 fcn-6" />}
42-
onChange={onChange}
43-
data-testid={DATE_PICKER_IDS.TIME}
44-
size={ComponentSizeType.large}
45-
menuPosition="fixed"
46-
/>
47-
{error && (
48-
<div className="form__error">
49-
<ErrorIcon className="form__icon form__icon--error" />
50-
{error}
51-
</div>
52-
)}
53-
</>
31+
<SelectPicker
32+
inputId={DATE_PICKER_IDS.TIME}
33+
placeholder="12:00 AM"
34+
options={DEFAULT_TIME_OPTIONS}
35+
isSearchable={false}
36+
isDisabled={disabled}
37+
{...timePickerProps}
38+
value={selectedTimeOption}
39+
icon={<ClockIcon className="icon-dim-20 fcn-6" />}
40+
onChange={onChange}
41+
data-testid={DATE_PICKER_IDS.TIME}
42+
size={ComponentSizeType.large}
43+
error={error}
44+
/>
5445
)

0 commit comments

Comments
 (0)