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

[Dialog] useDialogPosition 绑定了 getClickPosition,多次渲染没有清除,导致性能下降 #2748

Closed
moecasts opened this issue Feb 21, 2024 · 3 comments
Assignees
Labels
to be published fixed, not be published

Comments

@moecasts
Copy link
Collaborator

tdesign-react 版本

1.5.1

重现链接

No response

重现步骤

该部分代码只添加了事件,但没有清除,导致一直累加,多次渲染后导致性能严重下降。

https://github.com/Tencent/tdesign-react/blob/1718fbef56f3e503a5b34489b1af7d4f9c59aef8/src/dialog/hooks/useDialogPosition.ts#L16C1-L18C4

image

期望结果

No response

实际结果

No response

框架版本

No response

浏览器版本

No response

系统版本

No response

Node版本

No response

补充说明

下面的 useEffect 已经处理了事件绑定,这部分是不是可以删掉?

Copy link
Contributor

👋 @moecasts,感谢给 TDesign 提出了 issue。
请根据 issue 模版确保背景信息的完善,我们将调查并尽快回复你。

Copy link
Contributor

github-actions bot commented Feb 21, 2024

♥️ 有劳 @ldwonday @psaren @huoyuhao @honkinglin 尽快确认问题。
确认有效后将下一步计划和可能需要的时间回复给 @moecasts

@HaixingOoO HaixingOoO changed the title [Dialog] useDialogPosition 绑定了 getClickPosition,但没有清楚,导致多次渲染后,性能下降 [Dialog] useDialogPosition 绑定了 getClickPosition,多次渲染没有清除,导致性能下降 Feb 21, 2024
@HaixingOoO HaixingOoO added the to be published fixed, not be published label Feb 21, 2024
@HaixingOoO
Copy link
Collaborator

fixed 1.5.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
to be published fixed, not be published
Projects
None yet
Development

No branches or pull requests

3 participants