From f90fa3611dc55e9f1f18bb539b159734f4cdcf97 Mon Sep 17 00:00:00 2001 From: afc163 Date: Fri, 20 Jun 2025 22:55:32 +0800 Subject: [PATCH] fix: update rc-virtual-list and fix scrollbar color in dark theme (#54155) Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- components/list/style/index.ts | 2 ++ components/table/style/index.ts | 2 ++ components/tree/style/index.ts | 2 ++ package.json | 2 +- 4 files changed, 7 insertions(+), 1 deletion(-) diff --git a/components/list/style/index.ts b/components/list/style/index.ts index 1b8039b9ee..ada057e56f 100644 --- a/components/list/style/index.ts +++ b/components/list/style/index.ts @@ -199,6 +199,8 @@ const genBaseStyle: GenerateStyle = (token) => { [componentCls]: { ...resetComponent(token), position: 'relative', + // fix https://github.com/ant-design/ant-design/issues/46177 + ['--rc-virtual-list-scrollbar-bg' as const]: token.colorSplit, '*': { outline: 'none', }, diff --git a/components/table/style/index.ts b/components/table/style/index.ts index 0aa2ea85de..c1b580afd5 100644 --- a/components/table/style/index.ts +++ b/components/table/style/index.ts @@ -265,6 +265,8 @@ const genTableStyle: GenerateStyle = (token) => { [`${componentCls}-wrapper`]: { clear: 'both', maxWidth: '100%', + // fix https://github.com/ant-design/ant-design/issues/46177 + ['--rc-virtual-list-scrollbar-bg' as const]: token.tableScrollBg, ...clearFix(), [componentCls]: { diff --git a/components/tree/style/index.ts b/components/tree/style/index.ts index 9b6a52ebd5..fcf523f204 100644 --- a/components/tree/style/index.ts +++ b/components/tree/style/index.ts @@ -124,6 +124,8 @@ export const genBaseStyle = (prefixCls: string, token: TreeToken): CSSObject => return { [treeCls]: { ...resetComponent(token), + // fix https://github.com/ant-design/ant-design/issues/50316 + ['--rc-virtual-list-scrollbar-bg' as const]: token.colorSplit, background: token.colorBgContainer, borderRadius: token.borderRadius, transition: `background-color ${token.motionDurationSlow}`, diff --git a/package.json b/package.json index 1ef20b4f48..67d371fc16 100644 --- a/package.json +++ b/package.json @@ -294,7 +294,7 @@ "puppeteer": "^24.7.1", "rc-footer": "^0.6.8", "rc-tween-one": "^3.0.6", - "rc-virtual-list": "^3.17.0", + "rc-virtual-list": "^3.19.1", "react": "^19.1.0", "react-copy-to-clipboard": "^5.1.0", "react-countup": "^6.5.3",