Skip to content

Commit 5a409d9

Browse files
committed
revert
1 parent 634da6a commit 5a409d9

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

packages/react/collection/src/collection.tsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,8 @@ function createCollection<ItemElement extends HTMLElement, ItemData extends {} =
5656
);
5757

5858
type CollectionState = [
59-
ItemMap: ItemMap<ItemElement, ItemData>,
60-
SetItemMap: React.Dispatch<React.SetStateAction<ItemMap<ItemElement, ItemData>>>,
59+
ItemMap: ItemMap<ItemElement, AllItemData>,
60+
SetItemMap: React.Dispatch<React.SetStateAction<ItemMap<ItemElement, AllItemData>>>,
6161
];
6262

6363
const CollectionProvider: React.FC<{
@@ -167,7 +167,7 @@ function createCollection<ItemElement extends HTMLElement, ItemData extends {} =
167167
const ITEM_SLOT_NAME = name + 'CollectionItemSlot';
168168
const ITEM_DATA_ATTR = 'data-radix-collection-item';
169169

170-
type CollectionItemSlotProps = ItemData & {
170+
type CollectionItemSlotProps = AllItemData & {
171171
children: React.ReactNode;
172172
scope: any;
173173
};
@@ -197,12 +197,12 @@ function createCollection<ItemElement extends HTMLElement, ItemData extends {} =
197197
}
198198

199199
if (!map.has(element)) {
200-
map.set(element, { ...(itemData as unknown as ItemData), element });
200+
map.set(element, { ...(itemData as unknown as AllItemData), element });
201201
return map.toSorted(sortByDocumentPosition);
202202
}
203203

204204
return map
205-
.set(element, { ...(itemData as unknown as ItemData), element })
205+
.set(element, { ...(itemData as unknown as AllItemData), element })
206206
.toSorted(sortByDocumentPosition);
207207
});
208208

@@ -232,7 +232,7 @@ function createCollection<ItemElement extends HTMLElement, ItemData extends {} =
232232
* ---------------------------------------------------------------------------------------------*/
233233

234234
function useInitCollection() {
235-
return React.useState<ItemMap<ItemElement, ItemData>>(new OrderedDict());
235+
return React.useState<ItemMap<ItemElement, AllItemData>>(new OrderedDict());
236236
}
237237

238238
/* -----------------------------------------------------------------------------------------------

packages/react/direction/src/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
'use client';
12
export {
23
useDirection,
34
//

0 commit comments

Comments
 (0)