-
Notifications
You must be signed in to change notification settings - Fork 2.8k
fix(react-table): add support for native table elements #34817
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
base: master
Are you sure you want to change the base?
fix(react-table): add support for native table elements #34817
Conversation
📊 Bundle size reportUnchanged fixtures
|
@@ -2,7 +2,7 @@ import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utili | |||
import { TableContextValue } from '../Table/Table.types'; | |||
|
|||
export type TableCellSlots = { | |||
root: Slot<'td', 'div'>; | |||
root: Slot<'td', 'th' | 'div'>; |
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.
root: Slot<'td', 'th' | 'div'>; | |
root: Slot<'td', 'div'>; |
This shouldn't be necessary - there is TableHeaderCell
for that
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 reason for this change is that the DataGridSelectionCell
rendered in the header uses the TableCell
(and not TableHeaderCell
). Is there another way to implement that?
Pull request demo site: URL |
For the given code example:

Previous Behavior
DataGrid components accepted
as="table"
(also sub elements oftable
), but were not rendering them, leading to incorrect markupNew Behavior
DataGrid now renders correct table elements.