Skip to content

chore: upgrade trigger to 4.2.1 #216

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

Merged
merged 1 commit into from
May 20, 2020
Merged

chore: upgrade trigger to 4.2.1 #216

merged 1 commit into from
May 20, 2020

Conversation

kerm1it
Copy link
Member

@kerm1it kerm1it commented May 18, 2020

@afc163 fix #19536, support autoDestroy prop.

@codecov
Copy link

codecov bot commented May 18, 2020

Codecov Report

Merging #216 into master will increase coverage by 2.90%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #216      +/-   ##
==========================================
+ Coverage   88.00%   90.90%   +2.90%     
==========================================
  Files           3        3              
  Lines          25       33       +8     
  Branches       10       12       +2     
==========================================
+ Hits           22       30       +8     
  Misses          3        3              
Impacted Files Coverage Δ
src/Tooltip.tsx 88.46% <100.00%> (+5.12%) ⬆️

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 185c031...af280bf. Read the comment docs.

@afc163 afc163 requested a review from zombieJ May 19, 2020 08:19
@zombieJ
Copy link
Member

zombieJ commented May 19, 2020

我比较推荐去改 destroyTooltipOnHide,不用额外加一个 API。

@afc163
Copy link
Member

afc163 commented May 19, 2020

destroyTooltipOnHide: {
  destroyParentContainer?: boolean;
}

@zombieJ
Copy link
Member

zombieJ commented May 19, 2020

destroyParentContainer

keepParent: false 如何? 少一个重复的 destroy

@kerm1it
Copy link
Member Author

kerm1it commented May 19, 2020

destroyParentContainer

keepParent: false 如何? 少一个重复的 destroy

我有个疑问,销毁父元素和不销毁父元素在日常应用场景中有区别吗?也就是什么时候会用到不销毁父元素?

@zombieJ
Copy link
Member

zombieJ commented May 20, 2020

v3 兼容 React 15 保留父容器,现在看是没啥区别了。不过以防万一,可以默认保持原本的行为,之后发现没差就改掉 keepParent

@kerm1it
Copy link
Member Author

kerm1it commented May 20, 2020

@zombieJ @afc163 已经改了,destroyTooltipOnHide 增加了{ keepParent?: boolean },同时兼容原来的boolean类型,只有当keepParent等于false才会删除父元素。

@afc163
Copy link
Member

afc163 commented May 20, 2020

👍

@afc163 afc163 merged commit ee5b988 into react-component:master May 20, 2020
shc023 pushed a commit to shc023/tooltip that referenced this pull request Jul 31, 2021
* chore: feature merge master

* feat: Support mobile interactive

* tests: Add test case

* tests: Add coverage

* docs: Update example

* refactor: More comments

* chore: Warning info
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.

Tooltip 组件隐藏后,希望能删除 DOM 节点
3 participants