+
+
+
+
+
+
+
+
+ {/* number | { top } — absolute pixel scroll */}
+
+
+
+
+
+
+ {/* { key, align, offset } — scroll to an item */}
+
+
+
+
+ {/* { groupKey, align, offset } — scroll to a group header */}
+
+
+
+
+
+ last config:{' '}
+ {lastConfig === undefined ? '—' : JSON.stringify(lastConfig)}
+
+
+
{
+ const height = 40 + (index % 3) * 16;
+ return (
+
+ {item.name}
+
+ );
+ }}
+ group={{
+ key: (item) => item.group,
+ title: (key, groupItems) => (
+
+ {key} · {groupItems.length} items
+
+ ),
+ }}
+ />
+
+ );
+};
diff --git a/src/RawList/index.tsx b/src/RawList/index.tsx
index 5437218..4ca03f4 100644
--- a/src/RawList/index.tsx
+++ b/src/RawList/index.tsx
@@ -1,9 +1,10 @@
import * as React from 'react';
import clsx from 'clsx';
-import { useEvent } from '@rc-component/util';
import GroupHeader from '../GroupHeader';
import useGroupSegments from '../hooks/useGroupSegments';
+import useItemKey from '../hooks/useItemKey';
import useRawListScroll from './useRawListScroll';
+import { toTaggedKey, type KeyType } from '../util';
import type { ListComponentProps, ListyRef } from '../List';
// ============================== Types ===============================
@@ -36,38 +37,26 @@ function RawList