-
Notifications
You must be signed in to change notification settings - Fork 1.3k
fix: Virtualized Tree DnD fixes #8526
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
+21
−2
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Build successful! 🎉 |
devongovett
previously approved these changes
Jul 11, 2025
Build successful! 🎉 |
## API Changes
react-aria-components/react-aria-components:GridListLoadMoreItem-GridListLoadMoreItem <T extends {}> {
- children?: ReactNode
- className?: string
- isLoading?: boolean
- onLoadMore?: () => any
- scrollOffset?: number = 1
- style?: CSSProperties
-} /react-aria-components:ListBoxLoadMoreItem-ListBoxLoadMoreItem <T extends {}> {
- children?: ReactNode
- className?: string
- isLoading?: boolean
- onLoadMore?: () => any
- scrollOffset?: number = 1
- style?: CSSProperties
-} /react-aria-components:TableLoadMoreItem-TableLoadMoreItem <T extends {}> {
- children?: ReactNode
- className?: string
- isLoading?: boolean
- onLoadMore?: () => any
- scrollOffset?: number = 1
- style?: CSSProperties
-} /react-aria-components:TreeLoadMoreItem-TreeLoadMoreItem <T extends {}> {
- children?: ReactNode | ((TreeLoadMoreItemRenderProps & {
- defaultChildren: ReactNode | undefined
-})) => ReactNode
- className?: ClassNameOrFunction<TreeLoadMoreItemRenderProps>
- isLoading?: boolean
- onLoadMore?: () => any
- scrollOffset?: number = 1
- style?: StyleOrFunction<TreeLoadMoreItemRenderProps>
-} /react-aria-components:GridListLoadMoreItemProps-GridListLoadMoreItemProps {
- children?: ReactNode
- className?: string
- isLoading?: boolean
- onLoadMore?: () => any
- scrollOffset?: number = 1
- style?: CSSProperties
-} /react-aria-components:ListBoxLoadMoreItemProps-ListBoxLoadMoreItemProps {
- children?: ReactNode
- className?: string
- isLoading?: boolean
- onLoadMore?: () => any
- scrollOffset?: number = 1
- style?: CSSProperties
-} /react-aria-components:TableLoadMoreItemProps-TableLoadMoreItemProps {
- children?: ReactNode
- className?: string
- isLoading?: boolean
- onLoadMore?: () => any
- scrollOffset?: number = 1
- style?: CSSProperties
-} /react-aria-components:TreeLoadMoreItemProps-TreeLoadMoreItemProps {
- children?: ReactNode | ((TreeLoadMoreItemRenderProps & {
- defaultChildren: ReactNode | undefined
-})) => ReactNode
- className?: ClassNameOrFunction<TreeLoadMoreItemRenderProps>
- isLoading?: boolean
- onLoadMore?: () => any
- scrollOffset?: number = 1
- style?: StyleOrFunction<TreeLoadMoreItemRenderProps>
-} /react-aria-components:TreeLoadMoreItemRenderProps-TreeLoadMoreItemRenderProps {
- level: number
-} /react-aria-components:DragAndDropOptions DragAndDropOptions {
acceptedDragTypes?: 'all' | Array<string | symbol> = 'all'
dropTargetDelegate?: DropTargetDelegate
getAllowedDropOperations?: () => Array<DropOperation>
getDropOperation?: (DropTarget, DragTypes, Array<DropOperation>) => DropOperation
getItems?: (Set<Key>) => Array<DragItem> = () => []
isDisabled?: boolean
onDragEnd?: (DraggableCollectionEndEvent) => void
onDragMove?: (DraggableCollectionMoveEvent) => void
onDragStart?: (DraggableCollectionStartEvent) => void
onDrop?: (DroppableCollectionDropEvent) => void
onDropActivate?: (DroppableCollectionActivateEvent) => void
onDropEnter?: (DroppableCollectionEnterEvent) => void
onDropExit?: (DroppableCollectionExitEvent) => void
onInsert?: (DroppableCollectionInsertDropEvent) => void
onItemDrop?: (DroppableCollectionOnItemDropEvent) => void
onMove?: (DroppableCollectionReorderEvent) => void
onReorder?: (DroppableCollectionReorderEvent) => void
onRootDrop?: (DroppableCollectionRootDropEvent) => void
- renderDragPreview?: (Array<DragItem>) => JSX.Element | {
- element: JSX.Element
- x: number
- y: number
-}
+ renderDragPreview?: (Array<DragItem>) => JSX.Element
renderDropIndicator?: (DropTarget, Set<Key>, Key) => JSX.Element
shouldAcceptItemDrop?: (ItemDropTarget, DragTypes) => boolean
} /react-aria-components:UNSTABLE_GridListLoadingSentinel+UNSTABLE_GridListLoadingSentinel <T extends {}> {
+ children?: ReactNode
+ className?: string
+ isLoading?: boolean
+ onLoadMore?: () => any
+ scrollOffset?: number = 1
+ style?: CSSProperties
+} /react-aria-components:UNSTABLE_ListBoxLoadingSentinel+UNSTABLE_ListBoxLoadingSentinel <T extends {}> {
+ children?: ReactNode
+ className?: string
+ isLoading?: boolean
+ onLoadMore?: () => any
+ scrollOffset?: number = 1
+ style?: CSSProperties
+} /react-aria-components:UNSTABLE_TableLoadingSentinel+UNSTABLE_TableLoadingSentinel <T extends {}> {
+ children?: ReactNode
+ className?: string
+ isLoading?: boolean
+ onLoadMore?: () => any
+ scrollOffset?: number = 1
+ style?: CSSProperties
+} /react-aria-components:UNSTABLE_TreeLoadingIndicator+UNSTABLE_TreeLoadingIndicator <T extends {}> {
+ children?: ChildrenOrFunction<UNSTABLE_TreeLoadingIndicatorRenderProps>
+ className?: ClassNameOrFunction<UNSTABLE_TreeLoadingIndicatorRenderProps>
+ style?: StyleOrFunction<UNSTABLE_TreeLoadingIndicatorRenderProps>
+} @react-aria/dnd/@react-aria/dnd:DragPreviewProps DragPreviewProps {
- children: (Array<DragItem>) => JSX.Element | {
- element: JSX.Element
- x: number
- y: number
-} | null
+ children: (Array<DragItem>) => JSX.Element | null
} /@react-aria/dnd:DragPreview DragPreview {
- children: (Array<DragItem>) => JSX.Element | {
- element: JSX.Element
- x: number
- y: number
-} | null
+ children: (Array<DragItem>) => JSX.Element | null
} @react-aria/utils/@react-aria/utils:useLoadMoreSentinel-useLoadMoreSentinel {
- props: LoadMoreSentinelProps
- ref: RefObject<HTMLElement | null>
- returnVal: undefined
-} /@react-aria/utils:UNSTABLE_useLoadMoreSentinel+UNSTABLE_useLoadMoreSentinel {
+ props: LoadMoreSentinelProps
+ ref: RefObject<HTMLElement | null>
+ returnVal: undefined
+} @react-spectrum/s2/@react-spectrum/s2:ComboBoxSection ComboBoxSection <T extends {}> {
aria-label?: string
- children?: ReactNode | (T) => ReactElement
+ children?: ReactNode | ({}) => ReactElement
className?: string
dependencies?: ReadonlyArray<any>
id?: Key
- items?: Iterable<T>
+ items?: Iterable<{}>
style?: CSSProperties
- value?: T
+ value?: {}
} /@react-spectrum/s2:MenuSection MenuSection <T extends {}> {
aria-label?: string
- children?: ReactNode | (T) => ReactElement
+ children?: ReactNode | ({}) => ReactElement
className?: string
defaultSelectedKeys?: 'all' | Iterable<Key>
dependencies?: ReadonlyArray<any>
disabledKeys?: Iterable<Key>
disallowEmptySelection?: boolean
id?: Key
- items?: Iterable<T>
+ items?: Iterable<{}>
onSelectionChange?: (Selection) => void
selectedKeys?: 'all' | Iterable<Key>
selectionMode?: SelectionMode
style?: CSSProperties
- value?: T
+ value?: {}
} /@react-spectrum/s2:PickerSection PickerSection <T extends {}> {
aria-label?: string
- children?: ReactNode | (T) => ReactElement
+ children?: ReactNode | ({}) => ReactElement
className?: string
dependencies?: ReadonlyArray<any>
id?: Key
- items?: Iterable<T>
+ items?: Iterable<{}>
style?: CSSProperties
- value?: T
+ value?: {}
} /@react-spectrum/s2:ComboBoxSectionProps ComboBoxSectionProps <T extends {}> {
aria-label?: string
- children?: ReactNode | (T) => ReactElement
+ children?: ReactNode | ({}) => ReactElement
className?: string
dependencies?: ReadonlyArray<any>
id?: Key
- items?: Iterable<T>
+ items?: Iterable<{}>
style?: CSSProperties
- value?: T
+ value?: {}
} /@react-spectrum/s2:MenuSectionProps MenuSectionProps <T extends {}> {
aria-label?: string
- children?: ReactNode | (T) => ReactElement
+ children?: ReactNode | ({}) => ReactElement
className?: string
defaultSelectedKeys?: 'all' | Iterable<Key>
dependencies?: ReadonlyArray<any>
disabledKeys?: Iterable<Key>
disallowEmptySelection?: boolean
id?: Key
- items?: Iterable<T>
+ items?: Iterable<{}>
onSelectionChange?: (Selection) => void
selectedKeys?: 'all' | Iterable<Key>
selectionMode?: SelectionMode
style?: CSSProperties
- value?: T
+ value?: {}
} /@react-spectrum/s2:PickerSectionProps PickerSectionProps <T extends {}> {
aria-label?: string
- children?: ReactNode | (T) => ReactElement
+ children?: ReactNode | ({}) => ReactElement
className?: string
dependencies?: ReadonlyArray<any>
id?: Key
- items?: Iterable<T>
+ items?: Iterable<{}>
style?: CSSProperties
- value?: T
+ value?: {}
} |
devongovett
approved these changes
Jul 11, 2025
yihuiliao
approved these changes
Jul 11, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes:
✅ Pull Request Checklist:
📝 Test Instructions:
In Tree with drag and drop (virtualized) story, scroll the tree all the way down, then back up. Tab to the first item's drag button and press 'Enter'. The correct drop target should be visible and scrolled to. Previously the collection itself would be showed as focused, and the drop target wouldn't show until manually scrolled into view.
🧢 Your Project: