Skip to content
Draft
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
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ export interface UseTableFeaturesOptions<TItem> {
getRowId?: (item: TItem) => TableRowId;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🕵🏾‍♀️ visual regressions to review in the fluentuiv9 Visual Regression Report

Avatar Converged 2 screenshots
Image Name Diff(in Pixels) Image Type
Avatar Converged.Badge Mask RTL.chromium.png 12 Changed
Avatar Converged.badgeMask.chromium.png 15 Changed
Drawer 2 screenshots
Image Name Diff(in Pixels) Image Type
Drawer.Full Overlay High Contrast.chromium.png 4930 Changed
Drawer.Full Overlay RTL.chromium.png 1172 Changed

}

export type TableFeaturePlugin = <TItem>(tableState: TableFeaturesState<TItem>) => TableFeaturesState<TItem>;
export type TableFeaturePlugin<TItem> = (tableState: TableFeaturesState<TItem>) => TableFeaturesState<TItem>;

export interface ColumnWidthState {
columnId: TableColumnId;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export const defaultTableState: TableFeaturesState<unknown> = {

export function useTableFeatures<TItem>(
options: UseTableFeaturesOptions<TItem>,
plugins: TableFeaturePlugin[] = [],
plugins: TableFeaturePlugin<TItem>[] = [],
): TableFeaturesState<TItem> {
const { items, getRowId, columns } = options;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -157,16 +157,26 @@ export const Default = () => {
selectionMode="multiselect"
getRowId={item => item.file.label}
focusMode="composite"
style={{ minWidth: '550px' }}
>
<DataGridHeader>
<DataGridRow selectionCell={{ checkboxIndicator: { 'aria-label': 'Select all rows' } }}>
<DataGridRow
selectionCell={{
checkboxIndicator: { 'aria-label': 'Select all rows' },
style: { position: 'sticky', left: 0, zIndex: 1, background: 'white' },
}}
>
{({ renderHeaderCell }) => <DataGridHeaderCell>{renderHeaderCell()}</DataGridHeaderCell>}
</DataGridRow>
</DataGridHeader>
<DataGridBody<Item>>
{({ item, rowId }) => (
<DataGridRow<Item> key={rowId} selectionCell={{ checkboxIndicator: { 'aria-label': 'Select row' } }}>
<DataGridRow<Item>
key={rowId}
selectionCell={{
checkboxIndicator: { 'aria-label': 'Select row' },
style: { position: 'sticky', left: 0, zIndex: 1, background: 'white' },
}}
>
{({ renderCell }) => <DataGridCell>{renderCell(item)}</DataGridCell>}
</DataGridRow>
)}
Expand Down
Loading
Loading