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(comp:tabs): add onBeforeLeave prop #965

Merged
merged 1 commit into from
Jun 21, 2022

Conversation

liuzaijiang
Copy link
Contributor

PR Checklist

Please check if your PR fulfills the following requirements:

  • The commit message follows our guidelines
  • Tests for the changes have been added/updated or not needed
  • Docs and demo have been added/updated or not needed

What is the current behavior?

What is the new behavior?

| onBeforeLeave | 切换标签之前的钩子函数,返回 false 或 promise resolve false 或 promise reject 会阻止切换 | (key: VKey, oldKey?: VKey) => boolean \| Promise<boolean>| - | - | - |

Other information

@idux-bot
Copy link

idux-bot bot commented Jun 20, 2022

This preview will be available after the AzureCI is passed.

@codecov
Copy link

codecov bot commented Jun 20, 2022

Codecov Report

Merging #965 (af33592) into main (5db6616) will decrease coverage by 0.00%.
The diff coverage is 93.33%.

@@            Coverage Diff             @@
##             main     #965      +/-   ##
==========================================
- Coverage   92.88%   92.88%   -0.01%     
==========================================
  Files         700      700              
  Lines       68522    68559      +37     
  Branches     8023     8031       +8     
==========================================
+ Hits        63650    63684      +34     
- Misses       4872     4875       +3     
Impacted Files Coverage Δ
packages/components/tabs/src/Tabs.tsx 78.57% <90.00%> (-0.05%) ⬇️
packages/components/tabs/__tests__/tabs.spec.ts 99.15% <93.93%> (-0.85%) ⬇️
packages/components/tabs/src/tokens.ts 100.00% <100.00%> (ø)
packages/components/tabs/src/types.ts 100.00% <100.00%> (ø)

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 5db6616...af33592. Read the comment docs.

tests/utils.ts Outdated Show resolved Hide resolved
@danranVm danranVm merged commit 9a792e3 into IDuxFE:main Jun 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants