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: drawer): add OnOpen Event (#2533) #2553

Merged
merged 4 commits into from
Jul 12, 2022

Conversation

zxyao145
Copy link
Member

@zxyao145 zxyao145 commented Jul 4, 2022

🤔 This is a ...

  • New feature
  • Bug fix
  • Site / documentation update
  • Demo update
  • Component style update
  • Bundle size optimization
  • Performance optimization
  • Refactoring
  • Code style optimization
  • Test Case
  • Branch merge
  • Other (about what?)

🔗 Related issue link

#2533

💡 Background and solution

📝 Changelog

Language Changelog
🇺🇸 English add OnOpen Event for Drawer component
🇨🇳 Chinese 为 Drawer 组件添加 OnOpen 事件的支持

☑️ Self Check before Merge

⚠️ Please check all items below before review. ⚠️

  • Doc is updated/provided or not needed
  • Demo is updated/provided or not needed
  • Changelog is provided or not needed

@github-actions
Copy link

github-actions bot commented Jul 4, 2022

@codecov
Copy link

codecov bot commented Jul 4, 2022

Codecov Report

Merging #2553 (f820023) into master (08e8956) will increase coverage by 1.88%.
The diff coverage is 0.00%.

@@            Coverage Diff             @@
##           master    #2553      +/-   ##
==========================================
+ Coverage   27.70%   29.58%   +1.88%     
==========================================
  Files         497      520      +23     
  Lines       33442    25630    -7812     
  Branches        0      250     +250     
==========================================
- Hits         9265     7583    -1682     
+ Misses      24177    18007    -6170     
- Partials        0       40      +40     
Impacted Files Coverage Δ
components/drawer/Drawer.razor.cs 0.00% <0.00%> (ø)
components/drawer/DrawerContainer.razor 0.00% <ø> (ø)
components/drawer/DrawerRef.cs 0.00% <ø> (ø)
components/drawer/config/DrawerOpenEventArgs.cs 0.00% <0.00%> (ø)
components/core/Helpers/MemberPath/PathNode.cs 46.15% <0.00%> (-8.85%) ⬇️
components/core/Reflection/TypeDefined.cs 77.77% <0.00%> (-7.94%) ⬇️
components/input/InputGroup.razor.cs 87.50% <0.00%> (-6.95%) ⬇️
...ponents/date-picker/types/DatePickerPlaceholder.cs 22.72% <0.00%> (-4.20%) ⬇️
...ponents/core/Component/Overlay/type/TriggerType.cs 81.25% <0.00%> (-2.97%) ⬇️
components/core/Helpers/DateHelper.cs 80.00% <0.00%> (-2.71%) ⬇️
... and 427 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 08e8956...f820023. Read the comment docs.

@zxyao145 zxyao145 changed the title feat(module: drawer): add OnOpen Event (#2533) [WIP] feat(module: drawer): add OnOpen Event (#2533) Jul 4, 2022
@pr-triage pr-triage bot removed the PR: unreviewed label Jul 4, 2022
@zxyao145 zxyao145 changed the title [WIP] feat(module: drawer): add OnOpen Event (#2533) feat(module: drawer): add OnOpen Event (#2533) Jul 4, 2022
@zxyao145 zxyao145 requested a review from ElderJames July 4, 2022 11:27

void OnOpen(DrawerOpenEventArgs drawerOpenEventArgs)
{
bool cancel = ((openCounter++) % 2) == 0;
Copy link
Member

Choose a reason for hiding this comment

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

I think you can add a confirm to choose whether cancel.

@zxyao145 zxyao145 changed the title feat(module: drawer): add OnOpen Event (#2533) [WIP]feat(module: drawer): add OnOpen Event (#2533) Jul 10, 2022
@zxyao145
Copy link
Member Author

Since the display and hiding of the Drawer are controlled in OnParametersSet, in order to ensure rendering, OnOpen can only be called back in OnAfterRenderAsync, so OnOpen executed after the display.

@zxyao145 zxyao145 changed the title [WIP]feat(module: drawer): add OnOpen Event (#2533) feat(module: drawer): add OnOpen Event (#2533) Jul 10, 2022
@zxyao145 zxyao145 requested a review from ElderJames July 10, 2022 08:34
Copy link
Member

@ElderJames ElderJames left a comment

Choose a reason for hiding this comment

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

LGTM

@ElderJames ElderJames merged commit bf62fac into ant-design-blazor:master Jul 12, 2022
ElderJames pushed a commit that referenced this pull request Sep 6, 2022
* feat(module: drawer): add OnOpen Event (#2533)

* chore: add comment

* chore: docs update

* change drawer onopen event
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

2 participants