-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
feat(table): S2 tableview custom column menu #7617
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like this broke alignment in the resizing table header columns.
https://reactspectrum.blob.core.windows.net/reactspectrum/e6c04fecb3a59548fc621b334b4c75d3a2879cf4/storybook-s2/index.html?path=/story/tableview--resizing-table
https://reactspectrum.blob.core.windows.net/reactspectrum/e6c04fecb3a59548fc621b334b4c75d3a2879cf4/storybook-s2/index.html?path=/story/tableview--resizing-sortable-table
## API Changes
@react-spectrum/s2/@react-spectrum/s2:Column Column {
align?: 'start' | 'center' | 'end' = 'start'
allowsResizing?: boolean
allowsSorting?: boolean
children: ReactNode
className?: string | ((ColumnRenderProps & {
defaultClassName: string | undefined
})) => string
defaultWidth?: ColumnSize | null
id?: Key
isRowHeader?: boolean
maxWidth?: ColumnStaticSize | null
+ menu?: ReactNode
minWidth?: ColumnStaticSize | null
showDivider?: boolean
style?: CSSProperties | ((ColumnRenderProps & {
defaultStyle: CSSProperties
textValue?: string
width?: ColumnSize | null
} /@react-spectrum/s2:ColumnProps ColumnProps {
align?: 'start' | 'center' | 'end' = 'start'
allowsResizing?: boolean
allowsSorting?: boolean
children: ReactNode
className?: string | ((ColumnRenderProps & {
defaultClassName: string | undefined
})) => string
defaultWidth?: ColumnSize | null
id?: Key
isRowHeader?: boolean
maxWidth?: ColumnStaticSize | null
+ menu?: ReactNode
minWidth?: ColumnStaticSize | null
showDivider?: boolean
style?: CSSProperties | ((ColumnRenderProps & {
defaultStyle: CSSProperties
textValue?: string
width?: ColumnSize | null
} |
<MenuSection> | ||
<MenuItem onAction={action('filter')}><Filter /><Text slot="label">Filter</Text></MenuItem> | ||
</MenuSection> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The line as the first MenuItem
from a MenuSection
when it's the first section and there is no Header
looks weird. I checked our Menu
stories and they all have Header
s. Is this because a MenuSection
is wrapping the Collection
where the MenuItem
s are inserted into the TableHeader
's column cell?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Closes
Based on DNM - on hold: Implement Table Column custom actions
https://github.com/orgs/adobe/projects/19/views/32?visibleFields=%5B%22Title%22%2C%22Assignees%22%2C%22Status%22%2C4406231%2C25365423%2C3244152%2C5195578%2C17851188%2C30557450%2C3404283%2C%22Labels%22%5D&filterQuery=table&pane=issue&itemId=5984093
Some requirements we should consider, grouping multiple ways to sort. See acrobat.com's tables.
✅ Pull Request Checklist:
📝 Test Instructions:
🧢 Your Project: