@react-types/shared 3.0.0-nightly-7ee8d6420-250817 → 3.0.0-nightly-7a8c11aa3-250819
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/dnd.d.ts +2 -2
package/package.json
CHANGED
package/src/dnd.d.ts
CHANGED
|
@@ -277,7 +277,7 @@ export interface DraggableCollectionEndEvent extends DragEndEvent {
|
|
|
277
277
|
|
|
278
278
|
export type DragPreviewRenderer = (items: DragItem[], callback: (node: HTMLElement | null, x?: number, y?: number) => void) => void;
|
|
279
279
|
|
|
280
|
-
export interface DraggableCollectionProps {
|
|
280
|
+
export interface DraggableCollectionProps<T = object> {
|
|
281
281
|
/** Handler that is called when a drag operation is started. */
|
|
282
282
|
onDragStart?: (e: DraggableCollectionStartEvent) => void,
|
|
283
283
|
/** Handler that is called when the drag is moved. */
|
|
@@ -285,7 +285,7 @@ export interface DraggableCollectionProps {
|
|
|
285
285
|
/** Handler that is called when the drag operation is ended, either as a result of a drop or a cancellation. */
|
|
286
286
|
onDragEnd?: (e: DraggableCollectionEndEvent) => void,
|
|
287
287
|
/** A function that returns the items being dragged. */
|
|
288
|
-
getItems: (keys: Set<Key
|
|
288
|
+
getItems: (keys: Set<Key>, items: T[]) => DragItem[],
|
|
289
289
|
/** The ref of the element that will be rendered as the drag preview while dragging. */
|
|
290
290
|
preview?: RefObject<DragPreviewRenderer | null>,
|
|
291
291
|
/** Function that returns the drop operations that are allowed for the dragged items. If not provided, all drop operations are allowed. */
|