Skip to content

Conversation

@snowystinger
Copy link
Member

@snowystinger snowystinger commented Aug 20, 2025

Closes #8688

Not sure if there are enough uses to warrant it. I updated any places in our stories/docs, which was two places.

Edit:
Talked about with team, this moves us closer to monopackages, which is the direction we'd like to head.

✅ Pull Request Checklist:

  • Included link to corresponding React Spectrum GitHub Issue.
  • Added/updated unit tests and storybook for this change (for new code or code which already has tests).
  • Filled out test instructions.
  • Updated documentation (if it already exists for this component).
  • Looked at the Accessibility Practices for this feature - Aria Practices

📝 Test Instructions:

🧢 Your Project:

@rspbot
Copy link

rspbot commented Aug 20, 2025

@rspbot
Copy link

rspbot commented Aug 20, 2025

## API Changes

react-aria-components

/react-aria-components:useDrag

+useDrag {
+  options: DragOptions
+  returnVal: undefined
+}

/react-aria-components:useDrop

+useDrop {
+  options: DropOptions
+  returnVal: undefined
+}

/react-aria-components:DragOptions

+DragOptions {
+  getAllowedDropOperations?: () => Array<DropOperation>
+  getItems: () => Array<DragItem>
+  hasDragButton?: boolean
+  isDisabled?: boolean
+  onDragEnd?: (DragEndEvent) => void
+  onDragMove?: (DragMoveEvent) => void
+  onDragStart?: (DragStartEvent) => void
+  preview?: RefObject<DragPreviewRenderer | null>
+}

/react-aria-components:DragResult

+DragResult {
+  dragButtonProps: AriaButtonProps
+  dragProps: HTMLAttributes<HTMLElement>
+  isDragging: boolean
+}

@snowystinger snowystinger added this pull request to the merge queue Aug 27, 2025
Merged via the queue into main with commit 8c5b7a0 Aug 27, 2025
33 checks passed
@snowystinger snowystinger deleted the add-drag-hooks-to-rac branch August 27, 2025 04:52
LFDanLu added a commit that referenced this pull request Aug 28, 2025
github-merge-queue bot pushed a commit that referenced this pull request Aug 28, 2025
LFDanLu added a commit that referenced this pull request Aug 28, 2025
github-merge-queue bot pushed a commit that referenced this pull request Aug 28, 2025
…8795)

* Revert "Revert "chore: add dnd hooks to rac (#8743)" (#8793)"

This reverts commit 47b4d87.

* update yarn lock

* update snapshots

* sigh auto update snapshot failed lint
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

useDrag should be exposed in react-aria-components

5 participants