Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(module:date-picker): support date-picker placement #7527

Merged
merged 1 commit into from Jul 11, 2022

Conversation

TheBeard30
Copy link
Contributor

@TheBeard30 TheBeard30 commented Jun 21, 2022

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

[ ] Bugfix
[x] Feature
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no api changes)
[ ] Build related changes
[ ] CI related changes
[ ] Documentation content changes
[ ] Application (the showcase website) / infrastructure changes
[ ] Other... Please describe:

What is the current behavior?

Issue Number: #7389

What is the new behavior?

Does this PR introduce a breaking change?

[ ] Yes
[x] No

Other information

@TheBeard30 TheBeard30 requested a review from wenqi73 as a code owner June 21, 2022 01:41
@zorro-bot
Copy link

zorro-bot bot commented Jun 21, 2022

This preview will be available after the AzureCI is passed.

@codecov
Copy link

codecov bot commented Jun 21, 2022

Codecov Report

Merging #7527 (0f27d5c) into master (44d9770) will decrease coverage by 0.00%.
The diff coverage is 100.00%.

❗ Current head 0f27d5c differs from pull request most recent head d19fe85. Consider uploading reports for the commit d19fe85 to get more accurate results

@@            Coverage Diff             @@
##           master    #7527      +/-   ##
==========================================
- Coverage   91.73%   91.72%   -0.01%     
==========================================
  Files         502      502              
  Lines       16699    16710      +11     
  Branches     2750     2605     -145     
==========================================
+ Hits        15319    15328       +9     
- Misses       1050     1054       +4     
+ Partials      330      328       -2     
Impacted Files Coverage Δ
...nents/input-number/input-number-group.component.ts 98.96% <ø> (ø)
components/input-number/input-number.module.ts 100.00% <ø> (ø)
components/input/input-group.component.ts 98.96% <ø> (ø)
components/core/overlay/overlay-position.ts 92.30% <100.00%> (+1.39%) ⬆️
components/date-picker/date-picker.component.ts 92.76% <100.00%> (+0.18%) ⬆️
components/input-number/input-number.component.ts 99.60% <100.00%> (+<0.01%) ⬆️
components/input/input.directive.ts 98.57% <100.00%> (ø)
components/table/src/table/tbody.component.ts 88.88% <0.00%> (-11.12%) ⬇️
...ts/table/src/table/table-inner-scroll.component.ts 79.41% <0.00%> (-4.42%) ⬇️
components/table/src/table/tr-measure.component.ts 86.95% <0.00%> (-4.35%) ⬇️
... and 2 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 44d9770...d19fe85. Read the comment docs.

setPlacement(placement: NzPlacement): void {
const position: ConnectionPositionPair =
DATE_PICKER_POSITION_MAP[placement as keyof typeof DATE_PICKER_POSITION_MAP];
this.overlayPositions = [position];
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

还得有多个 position,否则滚动屏幕后 overlay 不会自动换位置。
参考下

this._positions = [...preferredPosition, ...DEFAULT_TOOLTIP_POSITIONS];

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

好的,我以为指定之后,就不能自动更换了👌🏻

Copy link
Member

@wenqi73 wenqi73 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, good job!

@simplejason simplejason merged commit a652470 into NG-ZORRO:master Jul 11, 2022
@TheBeard30 TheBeard30 deleted the date-picker-validation branch July 12, 2022 13:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants