Skip to content

Commit 38ba7e2

Browse files
authored
refactor: migrate to @rc-component/virtual-list (#1423)
1 parent 1c47315 commit 38ba7e2

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,8 @@
5252
"@rc-component/context": "^2.0.1",
5353
"@rc-component/resize-observer": "^1.0.0",
5454
"@rc-component/util": "^1.1.0",
55-
"clsx": "^2.1.1",
56-
"rc-virtual-list": "^3.14.2"
55+
"@rc-component/virtual-list": "^1.0.1",
56+
"clsx": "^2.1.1"
5757
},
5858
"devDependencies": {
5959
"@rc-component/father-plugin": "^2.0.1",

src/VirtualTable/BodyGrid.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { useContext } from '@rc-component/context';
2-
import VirtualList, { type ListProps, type ListRef } from 'rc-virtual-list';
2+
import VirtualList, { type ListProps, type ListRef } from '@rc-component/virtual-list';
33
import * as React from 'react';
44
import TableContext, { responseImmutable } from '../context/TableContext';
55
import useFlattenRecords, { type FlattenData } from '../hooks/useFlattenRecords';
@@ -224,7 +224,7 @@ const Grid = React.forwardRef<GridRef, GridProps>((props, ref) => {
224224
// ========================== Render ==========================
225225
const tblPrefixCls = `${prefixCls}-tbody`;
226226

227-
// default 'div' in rc-virtual-list
227+
// default 'div' in @rc-component/virtual-list
228228
const wrapperComponent = getComponent(['body', 'wrapper']);
229229

230230
// ========================== Sticky Scroll Bar ==========================

tests/Virtual.spec.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ const identity = (value: any) => value;
1111
global.scrollToConfig = null;
1212
global.collectGetScrollInfoReturn = identity;
1313

14-
vi.mock('rc-virtual-list', async () => {
15-
const RealVirtualList = ((await vi.importActual('rc-virtual-list')) as any).default;
14+
vi.mock('@rc-component/virtual-list', async () => {
15+
const RealVirtualList = ((await vi.importActual('@rc-component/virtual-list')) as any).default;
1616

1717
const WrapperVirtualList = React.forwardRef((props: any, ref) => {
1818
const myRef = React.useRef(null);

0 commit comments

Comments
 (0)