-
Notifications
You must be signed in to change notification settings - Fork 1.3k
feat: S2 treeview virtualized #7465
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
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
# Conflicts: # packages/@react-spectrum/s2/src/TreeView.tsx
## API Changes
react-aria-components/react-aria-components:TreeItemContentRenderProps TreeItemContentRenderProps {
allowsDragging?: boolean
hasChildRows: boolean
+ id: Key
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-spectrum/s2/@react-spectrum/s2:TreeView+TreeView {
+ UNSAFE_className?: string
+ UNSAFE_style?: CSSProperties
+ aria-describedby?: string
+ aria-details?: string
+ aria-label?: string
+ aria-labelledby?: string
+ children?: ReactNode | (T) => ReactNode
+ defaultExpandedKeys?: Iterable<Key>
+ defaultSelectedKeys?: 'all' | Iterable<Key>
+ dependencies?: Array<any>
+ disabledBehavior?: DisabledBehavior = 'selection'
+ disabledKeys?: Iterable<Key>
+ disallowEmptySelection?: boolean
+ expandedKeys?: Iterable<Key>
+ id?: string
+ isDetached?: boolean
+ isEmphasized?: boolean
+ items?: Iterable<T>
+ onAction?: (Key) => void
+ onExpandedChange?: (Set<Key>) => any
+ onSelectionChange?: (Selection) => void
+ renderEmptyState?: (TreeEmptyStateRenderProps) => ReactNode
+ selectedKeys?: 'all' | Iterable<Key>
+ selectionMode?: SelectionMode
+ slot?: string | null
+ styles?: StylesPropWithHeight
+} /@react-spectrum/s2:TreeViewItem+TreeViewItem <T extends {}> {
+ aria-label?: string
+ childItems?: Iterable<{}>
+ children: ReactNode
+ download?: boolean | string
+ hasChildItems?: boolean
+ href?: Href
+ hrefLang?: string
+ id?: Key
+ onHoverChange?: (boolean) => void
+ onHoverEnd?: (HoverEvent) => void
+ onHoverStart?: (HoverEvent) => void
+ ping?: string
+ referrerPolicy?: HTMLAttributeReferrerPolicy
+ rel?: string
+ routerOptions?: RouterOptions
+ target?: HTMLAttributeAnchorTarget
+ textValue: string
+ value?: T
+} /@react-spectrum/s2:TreeViewProps+TreeViewProps {
+ UNSAFE_className?: string
+ UNSAFE_style?: CSSProperties
+ aria-describedby?: string
+ aria-details?: string
+ aria-label?: string
+ aria-labelledby?: string
+ children?: ReactNode | (T) => ReactNode
+ defaultExpandedKeys?: Iterable<Key>
+ defaultSelectedKeys?: 'all' | Iterable<Key>
+ dependencies?: Array<any>
+ disabledBehavior?: DisabledBehavior = 'selection'
+ disabledKeys?: Iterable<Key>
+ disallowEmptySelection?: boolean
+ expandedKeys?: Iterable<Key>
+ id?: string
+ isDetached?: boolean
+ isEmphasized?: boolean
+ items?: Iterable<T>
+ onAction?: (Key) => void
+ onExpandedChange?: (Set<Key>) => any
+ onSelectionChange?: (Selection) => void
+ renderEmptyState?: (TreeEmptyStateRenderProps) => ReactNode
+ selectedKeys?: 'all' | Iterable<Key>
+ selectionMode?: SelectionMode
+ slot?: string | null
+ styles?: StylesPropWithHeight
+} /@react-spectrum/s2:TreeViewItemProps+TreeViewItemProps <T extends {} = {}> {
+ aria-label?: string
+ childItems?: Iterable<{}>
+ children: ReactNode
+ download?: boolean | string
+ hasChildItems?: boolean
+ href?: Href
+ hrefLang?: string
+ id?: Key
+ onHoverChange?: (boolean) => void
+ onHoverEnd?: (HoverEvent) => void
+ onHoverStart?: (HoverEvent) => void
+ ping?: string
+ referrerPolicy?: HTMLAttributeReferrerPolicy
+ rel?: string
+ routerOptions?: RouterOptions
+ target?: HTMLAttributeAnchorTarget
+ textValue: string
+ value?: T
+} |
github-merge-queue bot
pushed a commit
that referenced
this pull request
Jan 29, 2025
* Render a TreeView * Correct styles * update styles to better fix s2 * fix install * fix lint, add preliminary test * fix lint * Add tests and test util * save point * Add emptyState * fix lint * detached styles * detached styling with actions * fix disabled, icon placement, and add examples * fix lint * update snapshots * fix lint and tests * fix imports * Match row selection to table * fix lint, again * feat: S2 treeview virtualized (#7465) * feature: s2 treeview virtualization * support both detached and non in the layout * fix lint * fix height for docs * default tree disabled behavior to all to match our other components * fix tests * update snapshots * fix lint * fix alignment and remove minwidth * increase gap between detached items * remove restriction for isDetached and isEmphasized * fix border radius * review comments * fix lint
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.
Closes
✅ Pull Request Checklist:
📝 Test Instructions:
🧢 Your Project: