Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 41 additions & 2 deletions apps/vr-tests-react-components/src/stories/Table.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,46 @@ storiesOf('Table - cell actions', module)
</Table>
),
{ includeDarkMode: true, includeHighContrast: true, includeRtl: true },
);
)
.addStory('in header cell', () => (
<Table>
<TableHeader>
<TableRow>
{columns.map(column => (
<TableHeaderCell key={column.columnKey}>{column.label}</TableHeaderCell>
))}
</TableRow>
</TableHeader>
<TableBody>
{items.map(item => (
<TableRow key={item.file.label} className="row">
<TableHeaderCell>
<TableCellLayout media={item.file.icon}>
{item.file.label}
<TableCellActions>
<Button icon={<EditRegular />} appearance="subtle" />
<Button icon={<MoreHorizontalRegular />} appearance="subtle" />
</TableCellActions>
</TableCellLayout>
</TableHeaderCell>
<TableCell>
<TableCellLayout
media={
<Avatar name={item.author.label} badge={{ status: item.author.status as PresenceBadgeStatus }} />
}
>
{item.author.label}
</TableCellLayout>
</TableCell>
<TableCell>{item.lastUpdated.label}</TableCell>
<TableCell>
<TableCellLayout media={item.lastUpdate.icon}>{item.lastUpdate.label}</TableCellLayout>
</TableCell>
</TableRow>
))}
</TableBody>
</Table>
));

storiesOf('Table', module)
.addStory(
Expand Down Expand Up @@ -290,7 +329,7 @@ storiesOf('Table', module)
{items.map(item => (
<TableRow key={item.file.label}>
<TableCell>
<TableCellLayout media={item.file.icon} description="Your organization">
<TableCellLayout media={item.file.icon} description="Your organization" appearance="primary">
{item.file.label}
</TableCellLayout>
</TableCell>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "prerelease",
"comment": "fix: `TableCellActions` displays correctly inside `TableHeaderCell`",
"packageName": "@fluentui/react-table",
"email": "[email protected]",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ const useStyles = makeStyles({
textAlign: 'unset',
},
button: {
position: 'relative',
width: '100%',
display: 'flex',
flexGrow: 1,
Expand Down