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

fix(cdk:breakpoint): query unexpectedly destroyed #1357

Merged
merged 1 commit into from Dec 15, 2022

Conversation

sallerli1
Copy link
Contributor

query shouldn't be destroyed when same query is used elsewhere

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?

同时在两个组件中注册useBreakpoints,并使用相同的query,其中一个组件卸载会导致另外组件中监听不到breakpoints变化

What is the new behavior?

修复以上问题,增加引用次数逻辑,引用次数降为0才销毁

Other information

query shouldn't be destroyed when same query is used elsewhere
@idux-bot
Copy link

idux-bot bot commented Dec 14, 2022

This preview will be available after the AzureCI is passed.

@codecov
Copy link

codecov bot commented Dec 14, 2022

Codecov Report

Merging #1357 (3621d65) into main (84d0e66) will decrease coverage by 0.01%.
The diff coverage is 50.00%.

❗ Current head 3621d65 differs from pull request most recent head b8d0147. Consider uploading reports for the commit b8d0147 to get more accurate results

@@            Coverage Diff             @@
##             main    #1357      +/-   ##
==========================================
- Coverage   93.09%   93.07%   -0.02%     
==========================================
  Files         323      323              
  Lines       29896    29907      +11     
  Branches     2465     2466       +1     
==========================================
+ Hits        27832    27837       +5     
- Misses       2064     2070       +6     
Impacted Files Coverage Δ
packages/cdk/breakpoint/src/mediaQuery.ts 87.96% <50.00%> (-4.83%) ⬇️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@danranVm danranVm merged commit 2b45f6b into IDuxFE:main Dec 15, 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