fix: reduce store rerenders and cleanup timers

This commit is contained in:
2026-06-05 17:04:01 +08:00
parent 9999e516ae
commit 53f6a02377
6 changed files with 210 additions and 75 deletions
+2
View File
@@ -1098,6 +1098,8 @@ function ProductClonePage(_props: ProductClonePageProps = {}) {
};
const clearCloneSetCountHold = () => {
window.removeEventListener("pointerup", clearCloneSetCountHold);
window.removeEventListener("pointercancel", clearCloneSetCountHold);
if (countHoldTimeoutRef.current !== null) {
window.clearTimeout(countHoldTimeoutRef.current);
countHoldTimeoutRef.current = null;