From efbb2849dcbe4fc8e5ce0c0d5d61e6addf9d6d57 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BA=8C=E8=B4=A7=E6=9C=BA=E5=99=A8=E4=BA=BA?= Date: Sat, 25 Apr 2020 11:13:14 +0800 Subject: [PATCH] fix: Tree with quick `loadData` frozen the virtual scroll (#23581) * update version * add deadline * clean up --- components/_util/motion.tsx | 2 ++ package.json | 2 +- scripts/check-site.js | 2 -- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/components/_util/motion.tsx b/components/_util/motion.tsx index 62d4cf3a4a..efc7235ff4 100644 --- a/components/_util/motion.tsx +++ b/components/_util/motion.tsx @@ -9,6 +9,7 @@ interface Motion { motionEnter?: boolean; motionLeave?: boolean; motionLeaveImmediately?: boolean; // Trigger leave motion immediately + motionDeadline?: number; removeOnLeave?: boolean; leavedClassName?: string; onAppearStart?: MotionFunc; @@ -35,6 +36,7 @@ const collapseMotion: Motion = { onEnterActive: getRealHeight, onLeaveStart: getCurrentHeight, onLeaveActive: getCollapsedHeight, + motionDeadline: 500, }; export default collapseMotion; diff --git a/package.json b/package.json index d231c91089..8db8ddd7cf 100644 --- a/package.json +++ b/package.json @@ -107,7 +107,7 @@ "omit.js": "^1.0.2", "prop-types": "^15.7.2", "raf": "^3.4.1", - "rc-animate": "~2.10.2", + "rc-animate": "~2.11.0", "rc-cascader": "~1.0.0", "rc-checkbox": "~2.2.0", "rc-collapse": "~1.11.3", diff --git a/scripts/check-site.js b/scripts/check-site.js index b563750032..a4c9b33339 100755 --- a/scripts/check-site.js +++ b/scripts/check-site.js @@ -6,8 +6,6 @@ const cheerio = require('cheerio'); const glob = require('glob'); const uniq = require('lodash/uniq'); const { createServer } = require('http-server'); -const zhCN = require('../site/theme/zh-CN'); -const enUS = require('../site/theme/en-US'); const components = uniq( glob