momentum-design / momentum-ui

Momentum UI is a collection of UI libraries for implementing Momentum Design into web applications and websites.
https://momentum.design
MIT License
199 stars 204 forks source link

fix(timepicker): resolve combobox display issue #1697

Closed Jason20020 closed 3 months ago

Jason20020 commented 3 months ago

Description

I set the AmPmComboBox as absolute to let the option box will popover outside container and I create an empty div in generateAmPmComboBox, set the width to AmPmComboBox width to ensure the justify content center will work perfect. Then using transform to translate the amPm combo box - width back to its position.

Related Issue

Motivation and Context

The popover of am-pm-combo-box in date-time-picker not appear outside the date-time popover

How Has This Been Tested?

Yarn build not show error.

Screenshots:

Before (If applicable):

Screenshot 2024-07-15 at 12 26 43 Screenshot 2024-07-16 at 16 41 30

After:

Screenshot 2024-07-16 at 10 55 47

Types of changes

Checklist:

codecov[bot] commented 3 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 94.77%. Comparing base (b73c360) to head (03ee9f1). Report is 308 commits behind head on master.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #1697 +/- ## ========================================== + Coverage 94.02% 94.77% +0.74% ========================================== Files 132 134 +2 Lines 18176 19524 +1348 Branches 2769 3066 +297 ========================================== + Hits 17090 18503 +1413 + Misses 1086 1021 -65 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.