feat: (WIP) Async Menu support - #10494
Draft
LFDanLu wants to merge 2 commits into
Draft
Conversation
LFDanLu
commented
Aug 21, 2026
Member
Author
There was a problem hiding this comment.
basically ListBox's implementation
|
Build successful! 🎉 |
## API Changes
react-aria-components/react-aria-components:GridListLoadMoreItem GridListLoadMoreItem {
children?: ReactNode
- className?: string = 'react-aria-GridListLoadMoreItem'
+ className?: string = 'react-aria-GridListLoadingIndicator'
isLoading?: boolean
onLoadMore?: () => any
render?: DOMRenderFunction<keyof React.JSX.IntrinsicElements, undefined>
scrollOffset?: number = 1
}/react-aria-components:ListBoxLoadMoreItem ListBoxLoadMoreItem {
children?: ReactNode
- className?: string = 'react-aria-ListBoxLoadMoreItem'
+ className?: string = 'react-aria-ListBoxLoadingIndicator'
isLoading?: boolean
onLoadMore?: () => any
render?: DOMRenderFunction<keyof React.JSX.IntrinsicElements, undefined>
scrollOffset?: number = 1
}/react-aria-components:TableLoadMoreItem TableLoadMoreItem {
children?: ReactNode
- className?: string = 'react-aria-TableLoadMoreItem'
+ className?: string = 'react-aria-TableLoadingIndicator'
direction?: 'start' | 'end' = 'end'
isLoading?: boolean
onLoadMore?: () => any
render?: DOMRenderFunction<keyof React.JSX.IntrinsicElements, undefined>
style?: CSSProperties
}/react-aria-components:NavigationTree-NavigationTree <T> {
- aria-describedby?: string
- aria-details?: string
- aria-label?: string
- aria-labelledby?: string
- autoFocus?: boolean | FocusStrategy
- children?: ReactNode | (T) => ReactNode
- className?: ClassNameOrFunction<NavigationTreeRenderProps> = 'react-aria-NavigationTree'
- defaultExpandedKeys?: Iterable<Key>
- dependencies?: ReadonlyArray<any>
- disabledKeys?: Iterable<Key>
- expandedKeys?: Iterable<Key>
- id?: string
- items?: Iterable<T>
- onExpandedChange?: (Set<Key>) => any
- render?: DOMRenderFunction<keyof React.JSX.IntrinsicElements, NavigationTreeRenderProps>
- selectedRoute?: string | null
- slot?: string | null
- style?: StyleOrFunction<NavigationTreeRenderProps>
-}/react-aria-components:NavigationTreeItem-NavigationTreeItem <T extends {}> {
- aria-label?: string
- children: ReactNode
- className?: ClassNameOrFunction<NavigationTreeItemRenderProps> = 'react-aria-NavigationTreeItem'
- download?: boolean | string
- hasChildItems?: boolean
- href?: Href
- hrefLang?: string
- id?: Key
- isDisabled?: boolean
- onClick?: (MouseEvent<FocusableElement>) => void
- onHoverChange?: (boolean) => void
- onHoverEnd?: (HoverEvent) => void
- onHoverStart?: (HoverEvent) => void
- onPress?: (PressEvent) => void
- onPressChange?: (boolean) => void
- onPressEnd?: (PressEvent) => void
- onPressStart?: (PressEvent) => void
- onPressUp?: (PressEvent) => void
- ping?: string
- referrerPolicy?: HTMLAttributeReferrerPolicy
- rel?: string
- render?: DOMRenderFunction<keyof React.JSX.IntrinsicElements, NavigationTreeItemRenderProps>
- routerOptions?: RouterOptions
- style?: StyleOrFunction<NavigationTreeItemRenderProps>
- target?: HTMLAttributeAnchorTarget
- textValue: string
-}/react-aria-components:NavigationTreeItemContent-NavigationTreeItemContent {
- children: ChildrenOrFunction<NavigationTreeItemContentRenderProps>
-}/react-aria-components:NavigationTreeSection-NavigationTreeSection <T extends {}> {
- aria-label?: string
- children?: ReactNode | (T) => ReactElement
- className?: string
- dependencies?: ReadonlyArray<any>
- id?: Key
- items?: Iterable<T>
- render?: DOMRenderFunction<keyof React.JSX.IntrinsicElements, undefined>
- style?: CSSProperties
-}/react-aria-components:NavigationTreeHeader-NavigationTreeHeader {
- children?: ReactNode
- className?: string
- id?: string
- render?: DOMRenderFunction<keyof React.JSX.IntrinsicElements, undefined>
- style?: CSSProperties
-}/react-aria-components:NavigationTreeContext-NavigationTreeContext {
- UNTYPED
-}/react-aria-components:TreeLoadMoreItem TreeLoadMoreItem <T> {
children?: ChildrenOrFunction<TreeLoadMoreItemRenderProps>
- className?: ClassNameOrFunction<TreeLoadMoreItemRenderProps> = 'react-aria-TreeLoadMoreItem'
+ className?: ClassNameOrFunction<TreeLoadMoreItemRenderProps> = 'react-aria-TreeLoader'
isLoading?: boolean
onLoadMore?: () => any
render?: DOMRenderFunction<keyof React.JSX.IntrinsicElements, TreeLoadMoreItemRenderProps>
scrollOffset?: number = 1
}/react-aria-components:GridListLoadMoreItemProps GridListLoadMoreItemProps {
children?: ReactNode
- className?: string = 'react-aria-GridListLoadMoreItem'
+ className?: string = 'react-aria-GridListLoadingIndicator'
isLoading?: boolean
onLoadMore?: () => any
render?: DOMRenderFunction<keyof React.JSX.IntrinsicElements, undefined>
scrollOffset?: number = 1
}/react-aria-components:ListBoxLoadMoreItemProps ListBoxLoadMoreItemProps {
children?: ReactNode
- className?: string = 'react-aria-ListBoxLoadMoreItem'
+ className?: string = 'react-aria-ListBoxLoadingIndicator'
isLoading?: boolean
onLoadMore?: () => any
render?: DOMRenderFunction<keyof React.JSX.IntrinsicElements, undefined>
scrollOffset?: number = 1
}/react-aria-components:TableLoadMoreItemProps TableLoadMoreItemProps {
children?: ReactNode
- className?: string = 'react-aria-TableLoadMoreItem'
+ className?: string = 'react-aria-TableLoadingIndicator'
direction?: 'start' | 'end' = 'end'
isLoading?: boolean
onLoadMore?: () => any
render?: DOMRenderFunction<keyof React.JSX.IntrinsicElements, undefined>
style?: CSSProperties
}/react-aria-components:NavigationTreeProps-NavigationTreeProps <T> {
- aria-describedby?: string
- aria-details?: string
- aria-label?: string
- aria-labelledby?: string
- autoFocus?: boolean | FocusStrategy
- children?: ReactNode | (T) => ReactNode
- className?: ClassNameOrFunction<NavigationTreeRenderProps> = 'react-aria-NavigationTree'
- defaultExpandedKeys?: Iterable<Key>
- dependencies?: ReadonlyArray<any>
- disabledKeys?: Iterable<Key>
- expandedKeys?: Iterable<Key>
- id?: string
- items?: Iterable<T>
- onExpandedChange?: (Set<Key>) => any
- render?: DOMRenderFunction<keyof React.JSX.IntrinsicElements, NavigationTreeRenderProps>
- selectedRoute?: string | null
- slot?: string | null
- style?: StyleOrFunction<NavigationTreeRenderProps>
-}/react-aria-components:NavigationTreeRenderProps-NavigationTreeRenderProps {
- isEmpty: boolean
- isFocusVisible: boolean
- isFocused: boolean
- state: TreeState<unknown>
-}/react-aria-components:NavigationTreeItemProps-NavigationTreeItemProps <T = {}> {
- aria-label?: string
- children: ReactNode
- className?: ClassNameOrFunction<NavigationTreeItemRenderProps> = 'react-aria-NavigationTreeItem'
- download?: boolean | string
- hasChildItems?: boolean
- href?: Href
- hrefLang?: string
- id?: Key
- isDisabled?: boolean
- onClick?: (MouseEvent<FocusableElement>) => void
- onHoverChange?: (boolean) => void
- onHoverEnd?: (HoverEvent) => void
- onHoverStart?: (HoverEvent) => void
- onPress?: (PressEvent) => void
- onPressChange?: (boolean) => void
- onPressEnd?: (PressEvent) => void
- onPressStart?: (PressEvent) => void
- onPressUp?: (PressEvent) => void
- ping?: string
- referrerPolicy?: HTMLAttributeReferrerPolicy
- rel?: string
- render?: DOMRenderFunction<keyof React.JSX.IntrinsicElements, NavigationTreeItemRenderProps>
- routerOptions?: RouterOptions
- style?: StyleOrFunction<NavigationTreeItemRenderProps>
- target?: HTMLAttributeAnchorTarget
- textValue: string
-}/react-aria-components:NavigationTreeItemRenderProps-NavigationTreeItemRenderProps {
- allowsDragging?: boolean
- hasChildItems: boolean
- id: Key
- isCurrent: boolean
- isCurrentAncestor: boolean
- isDisabled: boolean
- isDragging?: boolean
- isDropTarget?: boolean
- isExpanded: boolean
- isFocusVisible: boolean
- isFocusVisibleWithin: boolean
- isFocused: boolean
- isHovered: boolean
- isPressed: boolean
- isSelected: boolean
- level: number
- selectionBehavior: SelectionBehavior
- selectionMode: SelectionMode
- state: TreeState<unknown>
-}/react-aria-components:NavigationTreeItemContentProps-NavigationTreeItemContentProps {
- children: ChildrenOrFunction<NavigationTreeItemContentRenderProps>
-}/react-aria-components:NavigationTreeItemContentRenderProps-NavigationTreeItemContentRenderProps {
- allowsDragging?: boolean
- hasChildItems: boolean
- id: Key
- isCurrent: boolean
- isCurrentAncestor: boolean
- isDisabled: boolean
- isDragging?: boolean
- isDropTarget?: boolean
- isExpanded: boolean
- isFocusVisible: boolean
- isFocusVisibleWithin: boolean
- isFocused: boolean
- isHovered: boolean
- isPressed: boolean
- isSelected: boolean
- level: number
- selectionBehavior: SelectionBehavior
- selectionMode: SelectionMode
- state: TreeState<unknown>
-}/react-aria-components:NavigationTreeSectionProps-NavigationTreeSectionProps <T> {
- aria-label?: string
- children?: ReactNode | (T) => ReactElement
- className?: string
- dependencies?: ReadonlyArray<any>
- id?: Key
- items?: Iterable<T>
- render?: DOMRenderFunction<keyof React.JSX.IntrinsicElements, undefined>
- style?: CSSProperties
-}/react-aria-components:NavigationTreeHeaderProps-NavigationTreeHeaderProps {
- children?: ReactNode
- className?: string
- id?: string
- render?: DOMRenderFunction<keyof React.JSX.IntrinsicElements, undefined>
- style?: CSSProperties
-}/react-aria-components:TreeLoadMoreItemProps TreeLoadMoreItemProps {
children?: ChildrenOrFunction<TreeLoadMoreItemRenderProps>
- className?: ClassNameOrFunction<TreeLoadMoreItemRenderProps> = 'react-aria-TreeLoadMoreItem'
+ className?: ClassNameOrFunction<TreeLoadMoreItemRenderProps> = 'react-aria-TreeLoader'
isLoading?: boolean
onLoadMore?: () => any
render?: DOMRenderFunction<keyof React.JSX.IntrinsicElements, TreeLoadMoreItemRenderProps>
scrollOffset?: number = 1
}/react-aria-components:MenuLoadMoreItem+MenuLoadMoreItem {
+ children?: ReactNode
+ className?: string = 'react-aria-MenuLoadingIndicator'
+ isLoading?: boolean
+ onLoadMore?: () => any
+ render?: DOMRenderFunction<keyof React.JSX.IntrinsicElements, undefined>
+ scrollOffset?: number = 1
+ style?: CSSProperties
+}/react-aria-components:MenuLoadMoreItemProps+MenuLoadMoreItemProps {
+ children?: ReactNode
+ className?: string = 'react-aria-MenuLoadingIndicator'
+ isLoading?: boolean
+ onLoadMore?: () => any
+ render?: DOMRenderFunction<keyof React.JSX.IntrinsicElements, undefined>
+ scrollOffset?: number = 1
+ style?: CSSProperties
+}@react-spectrum/ai/@react-spectrum/ai:ThreadLoadMoreItem ThreadLoadMoreItem {
children?: ReactNode
- className?: string = 'react-aria-GridListLoadMoreItem'
+ className?: string = 'react-aria-GridListLoadingIndicator'
isLoading?: boolean
onLoadMore?: () => any
render?: DOMRenderFunction<keyof React.JSX.IntrinsicElements, undefined>
scrollOffset?: number = 1
}/@react-spectrum/ai:ThreadLoadMoreItemProps ThreadLoadMoreItemProps {
children?: ReactNode
- className?: string = 'react-aria-GridListLoadMoreItem'
+ className?: string = 'react-aria-GridListLoadingIndicator'
isLoading?: boolean
onLoadMore?: () => any
render?: DOMRenderFunction<keyof React.JSX.IntrinsicElements, undefined>
scrollOffset?: number = 1
} |
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
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.
For coworker use case
✅ Pull Request Checklist:
📝 Test Instructions:
🧢 Your Project:
RSP